-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Imported styles take precedence over local styles when declared in same tag #2357
Comments
This is expected at the moment. I have to admit that mixing use of a style with include and content inside it is not something that I considered too deeply. I think it could be reasonable to change the behavior to make the includes first. |
Fwiw, sharing styles either with custom-style or in an element have the same 'include applies last' behavior. If we change it in custom-style, we should probably change it for other elements as well. |
/sub |
…e include cannot be found. Fixes #2357: include data now comes before any textContent in a style element.
… a style include cannot be found. Fixes Polymer#2357: include data now comes before any textContent in a style element.
So, if I do:
I would expect the local
.foo
rule to override any imported one. But it appears that the imported rules are added after any rules defined in the body of the tag, so they take precedence:http://jsbin.com/jivupu/edit?html,output
I'm not sure whether a) this is the expected behavior, and b) whether we even want to document using a style tag with both
include
and local rules.Please advise, @sorvell. Thanks.
The text was updated successfully, but these errors were encountered: