-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update CSS byte validation to 75000 #31
Conversation
lib/media.js
Outdated
@@ -71,8 +71,8 @@ function combineFileContents(fileArray, directory, filePrefix) { | |||
.then(function (fileContents) { | |||
const joined = fileContents.join(''); | |||
|
|||
if (util.getByteLength(joined) > 50000) { | |||
log('warn', 'Combined CSS contents are beyond the 50000 byte limit specified by AMPHTML.'); | |||
if (util.getByteLength(joined) > 75000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to link to the relevant docs to show where this number comes from.
if (util.getByteLength(joined) > 50000) { | ||
log('warn', 'Combined CSS contents are beyond the 50000 byte limit specified by AMPHTML.'); | ||
if (util.getByteLength(joined) > 75000) { | ||
log('warn', 'Combined CSS contents are beyond the 75000 byte limit specified by AMPHTML.'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you should put a second warning for articles > 70,000. So we can see how many articles are nearing the the limit too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great point, and I should take the opportunity to add a bit more context to the logged object too
Updating our CSS validation to reflect the fact that the AMP byte limit was increased from 50000 to 75000 in 2020: ampproject/amphtml#26466
Jira: https://vmproduct.atlassian.net/browse/CB-57