- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Sat, 09 Jan 2010 20:11:24 -0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Nikita Popov <privat@ni-po.com>, www-style list <www-style@w3.org>
Boris Zbarsky wrote: > On 1/9/10 9:17 PM, Andrew Fedoniouk wrote: >> Beside of the fact that @set feature significantly reduces CPU payload >> it is very useful for things like UI components frameworks > > Scoped stylesheets are indeed useful. Last I checked, there was work on > them; certainly Mozilla's current XBL has such a concept, and I think > HTML5 had some proposals along those lines as well. > > It sounds like your style sets are essentially scoped stylesheets with a > CSS selector syntax for establishing the scope, right? Correct, style set establishes its own scope. Even :root element inside the set matches the element with defined style-set attribute - not the document root. Rules inside the set know nothing about the document root - agnostic to their root element position in the host DOM. That is disputable of course, but it is how I see all this. One obvious exception though - scope is defined by the CSS itself and not by something external like XBL or HTML5. There are problems with external approach. For example multiple sets declared in single style unit (file) may use common @const declarations, etc. With style sets some framework (e.g. YUI or jQUI ) may define whole UI theme as a single CSS file instead of splitting all pieces into multiple files that need to be managed and downloaded separately, etc. As style sets do not create payload when not used then this is perfectly fine for such use cases. > > -Boris > -- Andrew Fedoniouk. http://terrainformatica.com
Received on Sunday, 10 January 2010 04:10:56 UTC