Skip to content

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

Merged
danielbachhuber merged 2 commits intopantheon-systems:masterfrom
westonruter:add/use-admin-bar-inline-style
Sep 9, 2019
Merged

Use inline style system to add admin bar styles to page#44
danielbachhuber merged 2 commits intopantheon-systems:masterfrom
westonruter:add/use-admin-bar-inline-style

Conversation

@westonruter
Copy link
Copy Markdown
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
@danielbachhuber danielbachhuber self-requested a review September 9, 2019 10:46
Copy link
Copy Markdown
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