Re: [whatwg] Selectors within style scoped

2011-09-28 Thread Roland Steiner
On Wed, Sep 28, 2011 at 2:49 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 28 Sep 2011, Roland Steiner wrote: Hm, AFAICT Hixie's mail on www-style@ didn't raise any objections against the idea itself, the discussion just revolves around what the exact syntax should be. Given that, what is

Re: [whatwg] Selectors within style scoped

2011-09-28 Thread Ian Hickson
On Wed, 28 Sep 2011, Roland Steiner wrote: On Wed, Sep 28, 2011 at 2:49 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 28 Sep 2011, Roland Steiner wrote: Hm, AFAICT Hixie's mail on www-style@ didn't raise any objections against the idea itself, the discussion just revolves around what

Re: [whatwg] Selectors within style scoped

2011-09-27 Thread Roland Steiner
Hm, AFAICT Hixie's mail on www-style@ didn't raise any objections against the idea itself, the discussion just revolves around what the exact syntax should be. Given that, what is the chance that we are able to go forward and declare selectors within style scoped as scoped, and leave the question

Re: [whatwg] Selectors within style scoped

2011-09-27 Thread Ian Hickson
On Wed, 28 Sep 2011, Roland Steiner wrote: Hm, AFAICT Hixie's mail on www-style@ didn't raise any objections against the idea itself, the discussion just revolves around what the exact syntax should be. Given that, what is the chance that we are able to go forward and declare selectors

Re: [whatwg] Selectors within style scoped

2011-09-20 Thread Roland Steiner
On Thu, Sep 15, 2011 at 9:55 AM, Ian Hickson i...@hixie.ch wrote: [...] However, as easy as that appears at first blush, I fear it would be seem quite magical to authors who have trouble enough understanding CSS as it is. Consider: aside section style scoped aside section

Re: [whatwg] Selectors within style scoped

2011-09-15 Thread Dimitri Glazkov
@global seems cool. Roland, WDYT? :DG

Re: [whatwg] Selectors within style scoped

2011-09-15 Thread Boris Zbarsky
On 9/15/11 9:40 AM, Dimitri Glazkov wrote: @global seems cool. Seems like it needs CSS core grammar changes to be usable with @media and the like, right? -Boris

Re: [whatwg] Selectors within style scoped

2011-09-15 Thread Tab Atkins Jr.
On Thu, Sep 15, 2011 at 10:27 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 9/15/11 9:40 AM, Dimitri Glazkov wrote: @global seems cool. Seems like it needs CSS core grammar changes to be usable with @media and the like, right? No, there's no core grammar changes to be made - the core grammar

Re: [whatwg] Selectors within style scoped

2011-09-15 Thread Boris Zbarsky
On 9/15/11 11:13 AM, Tab Atkins Jr. wrote: On Thu, Sep 15, 2011 at 10:27 AM, Boris Zbarskybzbar...@mit.edu wrote: On 9/15/11 9:40 AM, Dimitri Glazkov wrote: @global seems cool. Seems like it needs CSS core grammar changes to be usable with @media and the like, right? No, there's no core

Re: [whatwg] Selectors within style scoped

2011-09-15 Thread Tab Atkins Jr.
On Thu, Sep 15, 2011 at 11:29 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 9/15/11 11:13 AM, Tab Atkins Jr. wrote: On Thu, Sep 15, 2011 at 10:27 AM, Boris Zbarskybzbar...@mit.edu  wrote: On 9/15/11 9:40 AM, Dimitri Glazkov wrote: @global seems cool. Seems like it needs CSS core grammar

Re: [whatwg] Selectors within style scoped

2011-09-14 Thread Ian Hickson
The question posed in this thread is whether selectors in scoped style sheet blocks should be affected by ancestors of the scoped block. For example, should this be possible: body class=archive ... section style scoped section h1 { border-bottom: solid; }

Re: [whatwg] Selectors within style scoped

2011-09-13 Thread Roland Steiner
] on behalf of ext Kornel Lesiński [kor...@geekhood.net] Sent: 20 July 2011 22:37 To: a...@ashleysheridan.co.uk Cc: whatwg Subject: Re: [whatwg] Selectors within style scoped On Wed, 20 Jul 2011 20:55:51 +0100, Ashley Sheridan a...@ashleysheridan.co.uk wrote: div id=widget style scoped

Re: [whatwg] Selectors within style scoped

2011-07-22 Thread simon.madine
[whatwg-boun...@lists.whatwg.org] on behalf of ext Kornel Lesiński [kor...@geekhood.net] Sent: 20 July 2011 22:37 To: a...@ashleysheridan.co.uk Cc: whatwg Subject: Re: [whatwg] Selectors within style scoped On Wed, 20 Jul 2011 20:55:51 +0100, Ashley Sheridan a...@ashleysheridan.co.uk wrote: div

Re: [whatwg] Selectors within style scoped

2011-07-20 Thread Kornel Lesiński
On Tue, 19 Jul 2011 05:14:55 +0100, Boris Zbarsky bzbar...@mit.edu wrote: This is actually an interesting question. Does this end up corresponding to: :scope foo .bar, foo:scope .bar or to just :scope foo .bar ? The latter would not match on 'foo' being the scope element, while

Re: [whatwg] Selectors within style scoped

2011-07-20 Thread Ashley Sheridan
On Wed, 2011-07-20 at 20:36 +0100, Kornel Lesiński wrote: On Tue, 19 Jul 2011 05:14:55 +0100, Boris Zbarsky bzbar...@mit.edu wrote: This is actually an interesting question. Does this end up corresponding to: :scope foo .bar, foo:scope .bar or to just :scope foo .bar

Re: [whatwg] Selectors within style scoped

2011-07-20 Thread Kornel Lesiński
On Wed, 20 Jul 2011 20:55:51 +0100, Ashley Sheridan a...@ashleysheridan.co.uk wrote: div id=widget style scoped #widget foo {} /style /div While I agree that that might be a common pattern, I disagree that it's actually a good one. Consider an ad service which wraps everything in

Re: [whatwg] Selectors within style scoped

2011-07-19 Thread Boris Zbarsky
On 7/19/11 12:30 AM, Roland Steiner wrote: I think one could argue for either case. Personally, I think it's advantageous to include the scoping element (i.e., use :scope foo .bar, foo:scope .bar), in order to be able to do style the scoping element itself rather than its children individually,

Re: [whatwg] Selectors within style scoped

2011-07-19 Thread Tab Atkins Jr.
On Tue, Jul 19, 2011 at 6:11 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/19/11 12:30 AM, Roland Steiner wrote: I think one could argue for either case. Personally, I think it's advantageous to include the scoping element (i.e., use :scope foo .bar, foo:scope .bar), in order to be able to

Re: [whatwg] Selectors within style scoped

2011-07-19 Thread Roland Steiner
On Wed, Jul 20, 2011 at 12:47 AM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Tue, Jul 19, 2011 at 6:11 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/19/11 12:30 AM, Roland Steiner wrote: I think one could argue for either case. Personally, I think it's advantageous to include the

Re: [whatwg] Selectors within style scoped

2011-07-18 Thread Dimitri Glazkov
I actually really like this proposal. Let's do this. Roland, Dave, Boris -- what do y'all think? :DG On Fri, Jun 17, 2011 at 1:04 PM, Kornel Lesiński kor...@geekhood.net wrote: On Thu, 16 Jun 2011 19:32:42 +0100, Dimitri Glazkov dglaz...@chromium.org wrote: What if we do this: 1) By

Re: [whatwg] Selectors within style scoped

2011-07-18 Thread Boris Zbarsky
On 7/18/11 10:55 PM, Dimitri Glazkov wrote: I actually really like this proposal. Let's do this. Roland, Dave, Boris -- what do y'all think? The proposal being that all selectors are scoped except the ones where :root is present in the first sequence of simple selectors (not quite what

Re: [whatwg] Selectors within style scoped

2011-07-18 Thread Roland Steiner
On Tue, Jul 19, 2011 at 12:40 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/18/11 10:55 PM, Dimitri Glazkov wrote: I actually really like this proposal. Let's do this. Roland, Dave, Boris -- what do y'all think? The proposal being that all selectors are scoped except the ones where

Re: [whatwg] Selectors within style scoped

2011-07-18 Thread Boris Zbarsky
On 7/19/11 12:10 AM, Roland Steiner wrote: Just to nail this down: foo .bar scoped, foo must be the scope element or a descendant This is actually an interesting question. Does this end up corresponding to: :scope foo .bar, foo:scope .bar or to just :scope foo .bar ? The

Re: [whatwg] Selectors within style scoped

2011-07-18 Thread Roland Steiner
On Tue, Jul 19, 2011 at 1:14 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/19/11 12:10 AM, Roland Steiner wrote: Just to nail this down: foo .bar scoped, foo must be the scope element or a descendant This is actually an interesting question. Does this end up corresponding to:

Re: [whatwg] Selectors within style scoped

2011-06-17 Thread Roland Steiner
On Fri, Jun 17, 2011 at 2:45 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/17/11 1:39 AM, Roland Steiner wrote: Having another scoped stylesheet under an element further up. Why does that matter for the way rules in _this_ sheet are treated?

Re: [whatwg] Selectors within style scoped

2011-06-17 Thread Roland Steiner
On Fri, Jun 17, 2011 at 4:10 PM, Roland Steiner rolandstei...@google.comwrote: On Fri, Jun 17, 2011 at 2:45 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/17/11 1:39 AM, Roland Steiner wrote: Having another scoped stylesheet under an element further up. Why does that matter for the way

Re: [whatwg] Selectors within style scoped

2011-06-17 Thread Lachlan Hunt
On 2011-06-17 09:36, Roland Steiner wrote: On Fri, Jun 17, 2011 at 4:10 PM, Roland Steinerrolandstei...@google.comwrote: http://dev.w3.org/2006/webapi/selectors-api2/#the-scope-pseudo-class says: The :scopehttp://dev.w3.org/2006/webapi/selectors-api2/#scope pseudo-class *must* match any

Re: [whatwg] Selectors within style scoped

2011-06-17 Thread Kornel Lesiński
On Thu, 16 Jun 2011 19:32:42 +0100, Dimitri Glazkov dglaz...@chromium.org wrote: What if we do this: 1) By default, style scoped implies that all selectors in this stylesheet are prefixed with :scope. 2) Unless the :scope is already in the selector. That feels magical and a bit backwards

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Lachlan Hunt
On 2011-06-15 08:40, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element ofstyle scoped). For example: div class=foo div style scoped .foo p { display: none } /style pTo

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Roland Steiner
On Thu, Jun 16, 2011 at 6:11 PM, Lachlan Hunt lachlan.h...@lachy.id.auwrote: On 2011-06-15 08:40, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element ofstyle scoped). For example: div class=foo div

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Dimitri Glazkov
On Thu, Jun 16, 2011 at 2:11 AM, Lachlan Hunt lachlan.h...@lachy.id.au wrote: On 2011-06-15 08:40, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element ofstyle scoped). For example: div class=foo     div        

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Tab Atkins Jr.
On Thu, Jun 16, 2011 at 10:28 AM, Dimitri Glazkov dglaz...@chromium.org wrote: But looking at this with my Web developer hat on, I would almost _always_ prefix scoped rules with :scope, just to be safe. I certainly don't want my .closed .foo { display:none } to start reacting to some doofus

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Alex Russell
On Thu, Jun 16, 2011 at 2:11 AM, Lachlan Hunt lachlan.h...@lachy.id.auwrote: On 2011-06-15 08:40, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element ofstyle scoped). For example: div class=foo div

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Aryeh Gregor
On Thu, Jun 16, 2011 at 1:40 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: As a web developer, I agree - my intuitive understanding of @scoped is that it makes matching *start* at the scoped element.  That's what scoped means.  The other meaning is more like a filter. Me too. I think it

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Dimitri Glazkov
What if we do this: 1) By default, style scoped implies that all selectors in this stylesheet are prefixed with :scope. 2) Unless the :scope is already in the selector. :DG On Thu, Jun 16, 2011 at 10:40 AM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Thu, Jun 16, 2011 at 10:28 AM, Dimitri

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Boris Zbarsky
On 6/16/11 2:32 PM, Dimitri Glazkov wrote: What if we do this: 1) By default,style scoped implies that all selectors in this stylesheet are prefixed with :scope. 2) Unless the :scope is already in the selector. I could live with that. Especially if we allowed the CSSOM in this situation to

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread David Hyatt
Do you actually mean try out both :scope tacked on to the end of the rule as well as :scope (note the space indicating a descendant selector) tacked on to the beginning? So for example, #foo { } would turn into #foo:scope, :scope #foo { } thus allowing it to match either the scope or a

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Tab Atkins Jr.
On Thu, Jun 16, 2011 at 1:48 PM, David Hyatt hy...@apple.com wrote: Do you actually mean try out both :scope tacked on to the end of the rule as well as :scope (note the space indicating a descendant selector) tacked on to the beginning? So for example, #foo { } would turn into #foo:scope,

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Tab Atkins Jr.
On Thu, Jun 16, 2011 at 11:55 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/16/11 2:32 PM, Dimitri Glazkov wrote: What if we do this: 1) By default,style scoped  implies that all selectors in this stylesheet are prefixed with :scope. 2) Unless the :scope is already in the selector. I

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread David Hyatt
On Jun 16, 2011, at 4:14 PM, Tab Atkins Jr. wrote: On Thu, Jun 16, 2011 at 1:48 PM, David Hyatt hy...@apple.com wrote: Do you actually mean try out both :scope tacked on to the end of the rule as well as :scope (note the space indicating a descendant selector) tacked on to the beginning?

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Tab Atkins Jr.
On Thu, Jun 16, 2011 at 2:18 PM, David Hyatt hy...@apple.com wrote: On Jun 16, 2011, at 4:14 PM, Tab Atkins Jr. wrote: On Thu, Jun 16, 2011 at 1:48 PM, David Hyatt hy...@apple.com wrote: Do you actually mean try out both :scope tacked on to the end of the rule as well as :scope (note the

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Lachlan Hunt
On 2011-06-16 19:40, Tab Atkins Jr. wrote: I was convinced that @scoped worked exactly like this until this thread. Apparently my previous reading of the spec was insufficiently deep to spot the scoping/filtering difference. FWIW, I also think that querySelector got this wrong. It should have

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Tab Atkins Jr.
On Thu, Jun 16, 2011 at 3:19 PM, Lachlan Hunt lachlan.h...@lachy.id.au wrote: On 2011-06-16 19:40, Tab Atkins Jr. wrote: I was convinced that @scoped worked exactly like this until this thread.  Apparently my previous reading of the spec was insufficiently deep to spot the scoping/filtering

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Boris Zbarsky
On 6/17/11 1:15 AM, Roland Steiner wrote: Nitpick: prefixing :scope is only equivalent to limiting selector matching to the current scope iff there is no ancestor scope. Ancestor scope defined how? For a scoped stylesheet, there is only one scope, I would think: the parentNode of the style

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Roland Steiner
On Fri, Jun 17, 2011 at 3:55 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/16/11 2:32 PM, Dimitri Glazkov wrote: What if we do this: 1) By default,style scoped implies that all selectors in this stylesheet are prefixed with :scope. 2) Unless the :scope is already in the selector. I

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Roland Steiner
On Fri, Jun 17, 2011 at 2:18 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/17/11 1:15 AM, Roland Steiner wrote: Nitpick: prefixing :scope is only equivalent to limiting selector matching to the current scope iff there is no ancestor scope. Ancestor scope defined how? For a scoped

Re: [whatwg] Selectors within style scoped

2011-06-16 Thread Boris Zbarsky
On 6/17/11 1:39 AM, Roland Steiner wrote: Having another scoped stylesheet under an element further up. Why does that matter for the way rules in _this_ sheet are treated? -Boris

Re: [whatwg] Selectors within style scoped

2011-06-15 Thread Ian Hickson
On Wed, 15 Jun 2011, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element of style scoped). For example: div class=foo div style scoped .foo p { display: none } /style

Re: [whatwg] Selectors within style scoped

2011-06-15 Thread Dimitri Glazkov
On Tue, Jun 14, 2011 at 11:50 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 15 Jun 2011, Roland Steiner wrote: According to the HMTL5 spec, selectors are not limited to children of the scoping element (the parent element of style scoped). For example: div class=foo     div         style

Re: [whatwg] Selectors within style scoped

2011-06-15 Thread Ian Hickson
On Wed, 15 Jun 2011, Dimitri Glazkov wrote: On Tue, Jun 14, 2011 at 11:50 PM, Ian Hickson i...@hixie.ch wrote: XBL2 specifically gives the author control over this issue, because it is indeed a problem in a widget scoped style scenario. That's