Re: Scoped style sheets.

On Jul 14, 2008, at 5:50 PM, Andrew Fedoniouk wrote:

>
> One more thing about <style scoped />.
>
> What would be a specificity of CSS rules in scoped style sheet?
> Question is in markup:
>
> <html>
> <style>
>  body #content p { color:red; }
> <body>
>  <div #content>
>    <style scoped>
>        p { color:green; }
>    </style>
>    <p>what would be the color of this text?</p>
>  </div>
> </body>
> </html>
>
> It appears as <style scoped> should always be more specific than  
> rules in just a <style>.
> Yes/no?

My own opinion is that each scope should constitute a separate author  
cascade level.  This is how scoped stylesheets work in XBL.  So yes I  
agree with you and think the spec needs to be amended.

dave

Received on Monday, 14 July 2008 23:01:07 UTC