Re: <style scoped> and the cascade

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 UTC