W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2005

[whatwg] [html5] html:style parsing

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 31 Oct 2005 02:31:16 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0510310229060.9929@dhalsim.dreamhost.com>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:24 UTC