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

Use inline style system to add admin bar styles to page #44

Conversation

westonruter
Copy link
Contributor

@westonruter westonruter commented Sep 8, 2019

This improve the logic for injecting the admin bar styles into the page. Instead of manually adding a style element to the page, amend the inline styles for the admin-bar with the HUD styles. This results in the HUD styles being combined with any other inline styles for the admin bar.

This also results in the styles being automatically opted-in for the new dev mode in the AMP plugin: ampproject/amp-wp#3187. Otherwise, a data-ampdevmode attribute would need to be added to the style element. But if using the inline style system, then the AMP plugin will automatically flag it as being part of dev mode.

@danielbachhuber danielbachhuber added this to the 0.2.1 milestone Sep 9, 2019
Copy link
Contributor

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

Thanks @westonruter !

@danielbachhuber danielbachhuber merged commit f08e5b2 into pantheon-systems:master Sep 9, 2019
@westonruter westonruter deleted the add/use-admin-bar-inline-style branch September 9, 2019 13:45
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.

3 participants