W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Scoped style sheets.

From: David Hyatt <hyatt@apple.com>
Date: Mon, 14 Jul 2008 18:00:26 -0500
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, www-style <www-style@w3.org>, Ian Hickson <ian@hixie.ch>
Message-id: <61B29AB3-257D-481E-B37A-8D9AA079FCAF@apple.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT