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


Copy link

@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 Sep 9, 2019
Copy link

@danielbachhuber danielbachhuber left a comment

Thanks @westonruter !

@danielbachhuber danielbachhuber merged commit f08e5b2 into pantheon-systems:master Sep 9, 2019
1 check passed
@westonruter westonruter deleted the add/use-admin-bar-inline-style branch Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants