W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css3-box] run-ins: an alternative model

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 07 Aug 2012 17:20:21 -0700
Message-ID: <5021B0C5.9070308@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style@w3.org
On 07/19/2012 12:00 PM, Boris Zbarsky wrote:
> On 7/19/12 9:52 AM, fantasai wrote:
>> * Run-ins are only allowed to be the first inline in a block,
>> or the first inline following other run-ins.
>> Thus an inline followed by a run in causes the creation
>> of an anonymous block boundary between the two,
>> but a run-in followed by an inline form a block together.
>
> So any time a run-in is not part of a sequence of run-ins at the beginning of a block and not part of a sequence of run-ins
> that are followed by a block it gets moved into the following block?

I read the question, but can't make sense of it. :/

> I assume the "first inline" bit also has to ignore whitespace?

Yeah.

> How does this affect floating or positioned children of the run-in? What do their containing blocks end up being? (I believe
> this was already on the issues list.)

Exactly as if the run-in was originally a child of the block it's moved into.

>> * If the last run-in in a sequence is immediately followed
>> (ignoring out-of-flows and white space) by a block,
>> the entire sequence gets shifted into that block.
>
> But the out-of-flows and whitespace in question do not, correct?

Hm, interesting question. I suppose you could move the entire sequence of
run-ins and out-of-flows and anonymous white space nodes into the block.
Then the ordering stays the same, and you don't have to worry about
splicing the list.

>> Thoughts? bzbarsky, is this reasonably sane? :)
>
> I don't think it's any more insane than what we had so far, at least. ;)

I suppose that's a start. :) Let me have a second go at this...

Model is this:
   - run-ins are always treated like elements with ''display: inline''
   - except that they mangle the box tree thus:
     * If a run-in is preceded by an inline box (ignoring any anonymous
       inline boxes containing only collapsed white space),
       then it forces the creation of an anonymous block boundary
       between it and the preceding inline.
     * If the last run-in in a sequence of run-ins, out-of-flows,
       and anonymous inlines containing only white space
       is immediately followed (ignoring out-of-flows and white
       space) by a block box, the entire sequence (including any
       descendants) from the first run-in to the last run-in gets
       shifted into that block, becoming the first boxes in that
       block as if originally parented there.

How's that?

~fantasai
Received on Wednesday, 8 August 2012 00:20:49 GMT

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