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 default stylesheet for AMP content when in theme support mode #933

Closed
westonruter opened this issue Feb 6, 2018 · 0 comments
Closed
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented Feb 6, 2018

As discovered in #921 (comment) there are some CSS rules that the sanitizer expects to be present which are not currently being output when there is theme support. In particular, these styles seem to be necessary:

https://github.com/Automattic/amp-wp/blob/7b88ae0acd450e1658f1248d11319a01e7c5e920/templates/style.php#L39-L49

An audit needs to be done to see which styles are needing to be present in the default styles, without requiring each theme to implement these on their own. Given that the plugin will automatically concatenate CSS into the style[amp-custom] element, a new CSS file can be added and enqueued normally when an AMP page is rendered in theme support.

Note that the CSS enqueued in theme support should not include any of the styles that are used in the legacy paired mode templates.

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

No branches or pull requests

3 participants