W3C home > Mailing lists > Public > www-style@w3.org > September 2011

Re: Suggestion for @global to help with <style scoped>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 20 Sep 2011 09:50:54 -0700
Message-ID: <CAAWBYDBoxeZ=BkX+yXCpTSDHjPoWhApgoipO8MOechRT0+a0wQ@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org
On Tue, Sep 20, 2011 at 12:51 AM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 20/09/11 00:58, Tab Atkins Jr. a écrit :
>
>> Reasoning
>> ---------
>> The #2 meaning of "scoped" appears to be more intuitive to authors,
>> and appears to be more commonly used.
>
> More "commonly used"? I'd like to know how many mainstream web sites
> use scoped stylesheets! I suspect "negligible for the time being".

I gave several examples of scoped selectors other than <style scoped>,
such as querySelector/queryScopedSelector and jQuery.  Roland provides
the further example of manually-done "scoping" via prefixing with a
selector for the "scope root".


On Tue, Sep 20, 2011 at 12:53 AM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 20/09/11 00:58, Tab Atkins Jr. a écrit :
>> Summary
>> -------
>> HTML is defining<style scoped>  in a way which best matches author
>> intuitions, but which is limited in some ways.  I propose @global as a
>> way to get around those limitations while maintaining the
>> intuitiveness benefits.  Hixie wrote an email explaining the relevant
>> reasoning and suggesting this proposal at
>>
>> <http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-September/033222.html>.
>
> I read this proposal twice already and I still don't get it...
> I'll give it a third try but honestly, I don't understand it,
> don't get the rationale behind it, don't get the use case.

Unfortunately, I don't know what to say.  I thought I explained it
quite clearly.  There are two possible models of scoping.  Both have
strengths and weaknesses.  One is more intuitive, so we'd like to make
<style scoped> use it.  I'm proposing @global to address the weakness
of that scoping model.

~TJ
Received on Tuesday, 20 September 2011 16:51:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:44 GMT