CSS syntax inside scoped style, was: Wiki page for style attribute

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

Let's take the following HTML:
   <title>example page</title>
   <h1>Example page</h1>

   <div id="articles">
     <article id="article-1">
       <style scoped>
       <h1>Article title</h1>

     <article id="article-2">
       <h1>Article without style</h1>

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