W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: [CSS21] display:run-in clarifications

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 01 Sep 2009 20:54:56 -0400
Message-ID: <4A9DC260.3020501@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style@w3.org
Tab Atkins Jr. wrote:
> Ok; I agree with you that this is reasonable.  To be anywhere near
> consistent, though, *inheritance* has to still operate *purely* on the
> DOM tree, to avoid the contradiction issues you mentioned.  After
> everybody's gotten their values sent down the chain, then we can base
> things like containing blocks off of the box tree.

That's more or less how it works for everything except :first-line and 
run-ins anyway.

> Yeah, just let things inherit from the DOM, *then* act on the box tree
> for stuff like containing blocks.

That's what I'd like yes, but first-line throws a monkey wrench into the 
works.

> At what point are the ::first-line and ::first-letter pseudoelements
> created?

Undefined, but at least for first-line the things contained inside it 
clearly have to be determined at layout time.  How this interacts with 
inheritance from first-line is a still-open issue last I checked.

> Would it be after inheritance (basically causing a second
> round of inheritance cascade) or before?  If the former, they'll act
> on the run-in.  If the latter, they won't (as the run-in won't be part
> of the block they apply to yet).

Note that it's not really defined when the run-in is placed inside the 
block either.  As far as I can tell webkit handles this at layout time 
by mutating the box tree accordingly.  Gecko would likely handle this at 
box tree construction time.

In any case, since styles can change dynamically the ordering question 
is not exactly sensical.  If I build the box tree and lay it out and 
then then dynamically change the first-line color, then do we cound the 
run-in as inheriting from the first-line at that point?  If not, why 
not?  It's certainly inside the block at that point.  Though we could 
take as our conceptual model one that rebuilds the box tree from scratch 
on any mutation, of course.  Point is, ordering of these operations will 
depend on that sort of thing, and is not all that relevant to the 
question of what the final rendering should be like.

-Boris
Received on Wednesday, 2 September 2009 00:55:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:20 GMT