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

Add information about stylesheets included and excluded in style[amp-custom] #1135

merged 2 commits into from May 9, 2018


None yet
2 participants
Copy link

commented May 9, 2018

The following will be included, for example, to list out the stylesheets that are concatenated into style[amp-custom] and also to indicate which stylesheets were excluded for being too large.

The style[amp-custom] element is populated with:
- link#ampconf-css[rel=stylesheet][id=ampconf-css][href=https://src.wordpress-develop.test/wp-content/themes/ampconf/assets/dist/css/main.css?ver=4.9.6-alpha-42959-src][type=text/css][media=all] (15053 bytes)
- link#jetpack-widget-social-icons-styles-css[rel=stylesheet][id=jetpack-widget-social-icons-styles-css][href=https://src.wordpress-develop.test/wp-content/plugins/jetpack/modules/widgets/social-icons/social-icons.css?ver=20170506][type=text/css][media=all] (207 bytes)
Total size: 15260 bytes

The following stylesheets are too large to be include in style[amp-custom]:
- link#amp-default-css[rel=stylesheet][id=amp-default-css][href=https://src.wordpress-develop.test/wp-content/plugins/amp/assets/css/amp-default.css?ver=1.0-alpha][type=text/css][media=all] (77107 bytes)

This will be very helpful for debugging and it will improve transparency.

@westonruter westonruter added this to the v1.0 milestone May 9, 2018

@westonruter westonruter requested a review from kienstra May 9, 2018

@westonruter westonruter force-pushed the add/style-amp-custom-manifest branch from 4f00645 to 0a9dd78 May 9, 2018

Copy link

left a comment


Hi @westonruter,
Thanks, it's really helpful to see the sources of the CSS in the <style amp-custom>. This should also help with support topics.

The comments appeared as expected when using theme support (Paired Mode and Native AMP).

@westonruter westonruter merged commit ac37c38 into develop May 9, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@westonruter westonruter deleted the add/style-amp-custom-manifest branch May 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.