W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Selectors within <style scoped>

From: Roland Steiner <rolandsteiner@google.com>
Date: Fri, 17 Jun 2011 16:10:06 +0900
Message-ID: <BANLkTik2uFKH0UEviFOMzw2=RTbX5qYqU6P30+ZJ6UwbTLsiJg@mail.gmail.com>
On Fri, Jun 17, 2011 at 2:45 PM, Boris Zbarsky <bzbarsky at 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?
>

http://dev.w3.org/2006/webapi/selectors-api2/#the-scope-pseudo-class says:

The :scope <http://dev.w3.org/2006/webapi/selectors-api2/#scope>
 pseudo-class *must* match any element that is a contextual reference
element<http://dev.w3.org/2006/webapi/selectors-api2/#contextual-reference-element>
.

so :scope is ambiguous if you have several scoping elements as ancestors.
:scope in a nested sheet, meant to limit the rule to the nested scoping
element, may instead match against an enclosing scoping element. Again, see
the example I mailed earlier.


- Roland
Received on Friday, 17 June 2011 00:10:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC