- From: Rene Saarsoo <nene@triin.net>
- Date: Tue, 03 Jul 2007 20:44:58 +0300
- To: "Eric Daspet" <eric.daspet@survol.fr>, public-html@w3.org
Eric Daspet wrote: > <article> > <style scoped> color: blue ; </style> > <p>My external paragraph integrated in the main document</p> > </article> Is this really how the scoped style element should be used? As I have understanded the draft, you should still use selectors, like this: > <article> > <style scoped> p {color: blue;} </style> > <p>My external paragraph integrated in the main document</p> > </article> While I'm on to that, I would like to ask some questions about how the scoped style works, because the draft doesn't make it clear. Let's take the following HTML: <html> <head> <title>example page</title> </head> <body> <h1>Example page</h1> <p>...</p> <div id="articles"> <article id="article-1"> <style scoped> ... </style> <h1>Article title</h1> <p>...</p> <p>...</p> </article> <article id="article-2"> <h1>Article without style</h1> <p>...</p> <p>...</p> </article> </div> </body> </html> Now let's try some selectors in scoped style block. Of course the following will match all <p>-s inside article: p {} I guess all those also match the article element: article {} #article-1 {} article:first-child {} Does this also match the article? body > #articles > article {} Root element should still be html, so this should match nothing: :root {} -- Rene Saarsoo
Received on Tuesday, 3 July 2007 17:45:32 UTC