Re: [w3c/webcomponents] Best way to distribute global styles into shadow root? (#609)

@domenic If there's no clear way to do this, then this may in fact be a spec issue.

One solution in the community (by Polymer) is to make ["style modules"](https://www.polymer-project.org/1.0/docs/devguide/styling#style-modules), and with the `dom: 'shadow'` option to `window.Polymer`, that boils down to simply copying the `textContent` into the shadow root.

Is that the best solution currently, just copying `textContent` into a `<style>` element of a shadow root? If so, it seems a little hacky and wasteful (imagine having hundreds or thousands of elements that all have styles copied into them). So, this may in fact be a spec issue, although I'm not yet sure what the ideal solution would be.

Honestly, allowing questions to be posted in the very place where something is developed is most helpful for community members. The cost of having to add `question` labels to such issues is not very high compared to the gain for the community around a technology.

On top of that, people at StackOverflow [think the question is too broad to exist on SO](http://stackoverflow.com/questions/40695324/best-way-to-distribute-global-styles-into-shadow-roots?noredirect=1#comment68620332_40695324), which means my question will be closed if that sentiment gets enough votes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/609#issuecomment-261728971

Received on Saturday, 19 November 2016 17:58:03 UTC