- From: François REMY <fremycompany_pub@yahoo.fr>
- Date: Sat, 20 Oct 2012 00:21:58 +0200
- To: "Dimitri Glazkov" <dglazkov@google.com>, "Boris Zbarsky" <bzbarsky@mit.edu>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, <www-style@w3.org>, "Tony Ross" <tross@microsoft.com>
| For example, in frameworks where components are dynamically loaded (or | generated), their developers will use document.register | (http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register) | to register them with the document. As such, they would have no way to | specify a shared stylesheet. And that seems bad. I don't see why. The shared stylesheets will be automatically guessed from their template. I mean, by default, when the template will be copied, the same stylesheet will be reused for its copies (unless they modify it, but I guess they should not do that). | I chose to use rule-twiddling because of encapsulation: the state of | the tab manager is stored completely inside of the component. Had I | put a class on the tab, I would've leaked that state onto the children | of the tab manager. Again, you can change the class of an element located in your template. Since you can select elements directly from the shadow tree using @host {} you can easily solve this in an elegant way. Modifying the rules of a CSS file destroys a lot of browser optimizations. Modifying a CSS stylesheet should be a "I-have-no-other-solution" fix because it comes at very high costs.
Received on Friday, 19 October 2012 22:22:11 UTC