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

Handle styles that are not direct children of templates correctly #4979

Merged
merged 3 commits into from
Dec 7, 2017

Conversation

dfreedm
Copy link
Member

@dfreedm dfreedm commented Dec 6, 2017

Find the correct spot to add "included" styles in the template by
keeping track of which "concrete" style in the template we have
encountered and inserting the "included" styles before them.

Fixes #4975

Find the correct spot to add "included" styles in the template by
keeping track of which "concrete" style in the template we have
encountered and inserting the "included" styles before them.

Fixes #4975
@dfreedm
Copy link
Member Author

dfreedm commented Dec 6, 2017

Still investigating a few busted cases in Safari 10 and 9

Because the element wasn't floating, `top: 10px` was not showing up in
computed styles on Safari 9 and 10
Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

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

Can we add a test interleaving concrete styles & includes that would have been broken by the previous implementation?

@Westbrook
Copy link
Contributor

I also like how this adheres more closely to the cascade I'd expect to find when applying something like:

<style include="first-shared-style">
/* styles that override some of the shared styles */
</style>
<style include="second-shared-style-with-more-overrides">
/* a fourth override */
</style>

Thanks for the quick attention to this!

Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants