W3C home > Mailing lists > Public > public-html@w3.org > March 2012

(unknown charset) Re: <style scoped> and the cascade

From: (unknown charset) Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Thu, 8 Mar 2012 07:11:45 +0100
To: (unknown charset) Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: (unknown charset) public-html@w3.org
Message-ID: <20120308071145376137.3867466b@xn--mlform-iua.no>
Boris Zbarsky, Thu, 08 Mar 2012 00:30:18 -0500:
> On 3/7/12 11:22 PM, Leif Halvard Silli wrote:

>> So what is it in your proposal that makes the scoped style *in the
>> above example* win?
> 
> The fact that any rule in scoped style wins over any unscoped rule 
> (ignoring the effects of !important) with my proposal?  That's all 
> the proposal is about.

> In my proposal the scoped rule would win no matter what the 
> specificities are.

>> <div>
>>      <style id="a" scoped>* *{color:red}</style>
>>      Lorem
>>      <p>
>>        <style id="b" scoped>*{color:blue}</style>
>>        Ipsum
>>      </p>
>> </div>

> In my proposal the rule inside "b" would have higher specificity, 
> effectively.  More precisely, it would be in a different cascade 
> level, and sort by cascade level happens before sort by specificity.

OK. Now I got you. Thanks. Your proposal sounds good to me. Very good.
-- 
leif h silli
Received on Thursday, 8 March 2012 06:12:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:46 GMT