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 14:15:15 +0900
Message-ID: <BANLkTi=Zy8ib4673p12ZQjd_6GOwosi3R1JtnZUWzknZK2gpWw@mail.gmail.com>
On Fri, Jun 17, 2011 at 3:55 AM, Boris Zbarsky <bzbarsky at 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 could live with that.
>
> Especially if we allowed the CSSOM in this situation to include the implied
> ":scope" on selectors that did not include it in the text (in which case,
> this is a simple parse-time transformation on the stylesheet).
>

Nitpick: prefixing :scope is only equivalent to limiting selector matching
to the current scope iff there is no ancestor scope.

- Roland
Received on Thursday, 16 June 2011 22:15:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC