Re: Question about run-in and floats

On 1/21/10 7:07 AM, Alan Gresley wrote:
> The reason why you would want an element to clear a float within a
> run-in box is because the float itself may have undeclared or intrinsic
> (images) height. I could not imagine using margin-top on such an element
> that you wanted placed below the float.

OK, but where does it say this in the spec?

> I myself see very little use of having a float within a run-in box
> anyway since simpler constructions could be coded by simple floating.

Sure.  I just need to make sure that if someone _does_ do it the 
behavior is sane on my part (in the UA).

> Since a float generates a block box, then the run-in element will also
> be a block box.

The working group has resolved that out-of-flow boxes are not counted as 
block boxes for this purpose.  Please see the last set of working group 
resolutions regarding run-in.

>> IE8 and Opera 10.10 do not run in a run-in that contains a float.
>
> I presume that is because both implementations are following the above
> mentioned spec.

That's how they're interpreting the previously-ambiguous text, yes.  But 
the main point is that since they don't implement things the way they're 
not supposed to be implemented their behavior is not a useful guide to 
what the behavior should actually be.

> i would say the current rendering seen in IE8 and Opera 10.10> If this
> didn't happen then 9.2.3 would have to be changed.

9.2.3 (if you mean the CSS2.1 section) has pretty much rewritten from 
scratch to clarify what the behavior should be.  Unfortunately there's 
no draft with the new text published yet.

See http://lists.w3.org/Archives/Public/www-style/2009Nov/0249.html for 
the official notification.  The new text is more or less in 
http://lists.w3.org/Archives/Public/www-style/2009Aug/0607.html

> I can see many test cases are needed.

Like 
http://test.csswg.org/svn/contributors/bzbarsky/submitted/css2.1/run-in/ ?

-Boris

Received on Thursday, 21 January 2010 15:47:59 UTC