webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.15k stars 166 forks source link

[ShadyCSS] Mixins applied inconsistently #35

Open TomK opened 8 years ago

TomK commented 8 years ago

REF https://github.com/Polymer/polymer/issues/4115 Distributed nodes appear to be styled with mixins defined in the host, providing they are applied after the host has been defined.

Please note the following demo: http://codepen.io/oridan/pen/edqMPO?editors=1000 Item B simply extends Item A with no other changes. Therefore they should both display exactly the same. The expected result as I understand it should be per as the following image: image

RFC: I have resolved this where nativeCssVariables == true by applying the following two diffs: https://github.com/webcomponents/shadycss/compare/master...TomK:apply-host-descendants - quite inefficient https://github.com/webcomponents/shadycss/compare/master...TomK:refresh-invalid-shim

I understand this is not a complete resolution, and possibly this implementation is not feasible. So I am hoping for comments/suggestions to steer towards a viable solution.

dfreedm commented 8 years ago

Thanks for the test case. I think I have a simpler method that moves the invalid flag onto the element instances. Then sometime later, you can trigger an applyStyle on all of them.

TomK commented 7 years ago

@azakus any updates on this issue please?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.