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
merged 2 commits into from
May 9, 2018

Conversation

westonruter
Copy link
Member

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 06:41
@westonruter westonruter force-pushed the add/style-amp-custom-manifest branch from 4f00645 to 0a9dd78 Compare May 9, 2018 14:04
Copy link
Contributor

@kienstra kienstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Hi @westonruter,
Thanks, it's really helpful to see the sources of the CSS in the <style amp-custom>. This should also help with WordPress.org 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
@westonruter westonruter deleted the add/style-amp-custom-manifest branch May 9, 2018 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants