Re: Scoped style sheets.

On Tue, 15 Jul 2008, Tab Atkins Jr. wrote:
> 
> Just to make it completely clear, take this document:
> <style>
>   #content p { color: red; }
> </style>
> <body>
>   <header>header content...</header>
>   <article id="content">
>     <style scoped>
>       p { color: blue }
>     </style>
>     <p>article content...</p>
>   </article>
> </body>

I don't understand why anyone creating such syndicated documents would 
ever have any rules with #content in the selector as part of their global 
style sheet if they _didn't_ want to override the syndicated style sheet.


> 2)  Your argument is that the global author should have an easy way to
> override the scoped styles.  Why is this?

Because in the case of a syndicated document stream, the article author 
writes and styles his content first, and then the syndicator takes those 
files and merges them, at which point he can do touch-ups. You don't 
publish the frame before you have the content. The person who writes the 
style sheet last is the one who should get the ability to easily override 
the styles.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 15 July 2008 19:22:56 UTC