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

Re: [CSS21] display:run-in clarifications

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 1 Sep 2009 09:50:35 -0500
Message-ID: <dd0fbad0909010750l5c56c75akccd4ecd364242fc7@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Bert Bos <bert@w3.org>, www-style@w3.org
On Tue, Sep 1, 2009 at 8:14 AM, Boris Zbarsky<bzbarsky@mit.edu> wrote:
> Boris Zbarsky wrote:
>>
>> Makes the [1] reference a little confusing, but other than that, looks
>> good.
>
> I was making notes to myself on implementing this stuff, and found another
> possible ambiguity.  If an element with display:run-in has an absolutely
> positioned or floated child, and gets run in, what is the right containing
> block for the child?  Is it the nearest block parent the run-in used to
> have?  Or the block the run-in ran into?
>
> Testcase:
>
> <!DOCTYPE html>
> <html>
> <body>
>  <div style="padding: 100px; border: 1px solid green; position: relative">
>    <span style="display:run-in; border: 1px solid red">
>      <div style="position: absolute; top: 0; left: 0">aaa</div>
>      bbb
>      <div style="float: left">ccc</div>
>    </span>
>    <div style="position: relative; border: 1px solid black">
>    </div>
>  </div>
> </body>
> </html>
>
> In Opera and IE8, the run-in just doesn't run in, as I recall.  I can't make
> sense of what webkit is doing; all the text except "aaa" disappears here.
>
> It would make the most sense to me to use the block the run-in ran into as
> the containing block.
>
> Is this already covered by the spec text in some way, or do we need to make
> it explicit?

I dunno if it's covered, but since inlines can't be containers for
abspos elements, the only sensical option is to make the block that it
ran into the containing block, as you suggest.

~TJ
Received on Tuesday, 1 September 2009 14:51:31 GMT

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