Skip to content
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

Excessive CSS output causing AMP validation error in AMP plugin's Classic mode #144

Closed
westonruter opened this issue Mar 12, 2019 · 3 comments

Comments

@westonruter
Copy link

As reported in https://wordpress.org/support/topic/amp-issues-detected/ when in the AMP plugin's Classic mode, BigCommerce is adding 46KB of CSS on its own. The AMP plugin's classic post template has 6 KB, and thus results in a total CSS of 52KB. This is 2KB more than the 50KB limit imposed by AMP, and the result is an AMP validation error.

@karen-white
Copy link

Thanks for reporting this @westonruter ! (and thanks for the PR :) We'll get this reviewed by the dev team.

@karen-white
Copy link

After discussing with the dev team, we feel that the best way forward is to drop official support for Classic (reader) mode. Based on articles like this one from XWP, we'd like to steer users toward Native or Paired. We also notice that the error goes away if you aren't logged in or if you hide the admin banner while logged in. We can look at reducing the CSS weight over time, but the admin banner seems like it's just enough additional CSS to cause the error. Closing this in favor of noting this in our documentation for now.

@westonruter
Copy link
Author

Guiding users to the Native/Transitional modes is what we recommend as well.

Aside: There are some big improvements coming to CSS handling in the plugin:

Also, we're considering running the Reader mode templates through the full-page sanitizer which should also fix this issue, as it would include tree-shaking: ampproject/amp-wp#2202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants