Re: [CSS21] display:run-in clarifications

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?

-Boris

Received on Tuesday, 1 September 2009 13:15:12 UTC