W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [cssom] Make CSSStyleSheet constructable

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Sat, 20 Oct 2012 00:21:58 +0200
Message-ID: <E44DB6534D1F440BAA0D8DB2A7F6125A@FREMYD2>
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
|  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 
Received on Friday, 19 October 2012 22:22:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:22 UTC