[whatwg] [html5] html:style parsing

On Mon, 31 Oct 2005, Lachlan Hunt wrote:
> 
> | All child elements must be processed, according to their semantics,
> | before the style element itself is evaluated.
> 
> Ok, that's a little improvement, but it should probably say "All 
> [descendant] elements..."

Yeah, good call.

*fixes spec*

*fixes other spec from which he copied that text*


> So let me see if I get this right:
> 
> <style id="s1">
>   .one { background:red }
>   .two { background:lime }
>   <p>
>     .two { background:red }
>     <style id="s2">
>       .one { background:lime }
>       .three { background:lime }
>     </style>
>   </p>
>   .three { background:red }
> </style>
> 
> In that case, the result passed to the style system will be equivalent to:
> 
> From #s1:
>   .one { background:red }
>   .two { background:lime }
>   .three { background:red }
> 
> From #s2:
>   .one { background:lime }
>   .three { background:lime }
> 
> Is that correct?

Yes (including the order).

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

Received on Sunday, 30 October 2005 18:31:16 UTC