Re: Scoped style element questions Re: Unscoped <style> found outside the <head>

On May 29, 2007, at 03:52, Karl Dubost wrote:

> Le 27 mai 2007 à 17:13, David Hyatt a écrit :
>> This behavior is clearly what Web authors think happens now when  
>> they misuse <style> in random spots in the middle of the  
>> document.  They just think they've thrown some extra rules into  
>> the page that will apply to following content.  They don't think  
>> that it will retroactively apply to previous content in the page.
>
> If I understand the two proposals so far.
>
> * Dave Hyatt is saying only what comes after the style element is  
> styled, i.e. "content 2" and "div.child"
> * Others: everything inside div.parent is styled.

Unless someone demonstrates that being able to style the parent, I  
think Dave Hyatt's suggestion that <style scoped> apply to following  
siblings and their descendants makes sense. It combines the  
intuitiveness of ending the style scope when the parent closes with  
the efficiency of not having to recompute the style of any preceding  
elements.

If this is accepted, though, the next question becomes if it made  
sense to allow <style scoped> in more places for the purpose of  
document conformance.

> * what's happening with a rule like:
>     style {display: block;
>         background:red;}

Nothing, since the style applies to following siblings.

> * Is an empty element a parent?

No.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 29 May 2007 05:15:36 UTC