W3C home > Mailing lists > Public > public-html@w3.org > July 2007

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

From: Eric Daspet <eric.daspet@survol.fr>
Date: Wed, 4 Jul 2007 10:29:00 +0200
Message-ID: <fb3a3ce70707040129r31c81701w5b1c14deca9addfa@mail.gmail.com>
To: "Rene Saarsoo" <nene@triin.net>
Cc: public-html@w3.org
On 7/3/07, Rene Saarsoo <nene@triin.net> wrote:
>
> 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>



That is an error from me while writting the example, sorry for that.



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?


There was a thread about that. AFAIR we ended with "the scoped style does
not interacts with the container" (in this case with <article>)



-- 
√Čric Daspet
http://eric.daspet.name/
Received on Wednesday, 4 July 2007 08:29:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT