
Loading…
<style> in ShadowDOM is unreachable by polyfill #7
PolymerCommunityBot
commented
PolymerCommunityBot
commented
Comment by sorvell
Wednesday Jul 10, 2013 at 17:13 GMT
This issue is due to the way styling is simulated by ShadowCSS when using the ShadowDOM polyfill.
Style elements are pulled out of ShadowDOM, selectors are re-scoped to match only within the shadowRoot, and a style element with the new rules is added to document.head. Polymer uses ShadowCSS to manipulate the element's such that a single style element is added to document for each element definition.
Unfortunately, this technique does not allow for manipulation of style elements in the shadowRoot. How best to simulate styling under the ShadowDOM polyfill is area of ongoing investigation that we hope to improve.
Owner
garlicnation
commented
No longer true in 2015. http://jsbin.com/focepatiri/1/edit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wednesday Jul 10, 2013 at 17:06 GMT
Originally opened as https://github.com/Polymer/platform/issues/23
this.shadowRoot.querySelector('style') == null in the following test. Try in webkit.
http://jsbin.com/ebuxem/5/edit
Moved issue from https://github.com/Polymer/ShadowDOM/issues/183.