W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-scoping] Shadow Cascading

From: Rune Lillesveen <rune@opera.com>
Date: Thu, 5 Feb 2015 00:33:29 +0100
Message-ID: <CANz6XvSS_yvJU=OWC0M=07Hqq8BC_8Z_zuHMbECFWkUKmZu3Og@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Hayato Ito <hayato@google.com>, www-style list <www-style@w3.org>
On Wed, Feb 4, 2015 at 11:52 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Thu, Feb 5, 2015 at 9:38 AM, Hayato Ito <hayato@google.com> wrote:
>> Looks like the current spec wants to say:
>> 1. The Origin and Importance matters
>> 2. [Shadow Tree] The outer wins the inner (only when there is an
>> ancestor/descendant relationship between two node trees)
>> 3. [Shadow Tree] The younger wins the older (only when they are hosted by
>> the same shadow host)
>> 4. Specificity matters
>> 5. Order of Appearance in tree-of-trees matters
> Yes.  As far as I can tell, that's *exactly* what the spec is saying.
> Is there anything unclear?

No, it's clear now.

> Note that you can fall all the way down to criteria 5 if, for example,
> one shadow root reaches into a sibling shadow root and then into the
> shadow of something else inside of there.  When comparing that
> declaration with one from inside the "something else", neither
> criteria 2 nor criteria 3 apply, so you end up having to compare
> specificity and ordering.

A more common case is distribution and the application of ::content
rules. It means all ::content rules will be ordered by specificity
before order of appearance (tree of trees), and that inner ::content
rules wins over outer ::content rules in the composed tree (as opposed
to 2.) when the specificity is the same.

Rune Lillesveen
Received on Wednesday, 4 February 2015 23:33:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:51 UTC