Re: [CSS21] More issues with issues with 9.5 (Floats)

On 09/06/2010 01:53 PM, L. David Baron wrote:
> On Monday 2010-09-06 22:39 +0200, Anton Prowse wrote:
>> On 06/09/2010 20:32, L. David Baron wrote:
>>> On Sunday 2010-09-05 10:39 +0200, Anton Prowse wrote:
>>>> A couple more float issues.
>>>>
>>>> Issue 1:
>>>>
>>>> There is excellent interop demonstrating that line boxes are not
>>>> shortened in the presence of floats which appear later in the source
>>>> document (and hence overlap the floats in many situations).  This
>>>> fact is missing from the spec.
>>>
>>> In what such cases does the spec currently say that such a float
>>> should shorten such a line box?  Given rule 6 in section 9.5.1, I'd
>>> think there aren't any such cases, since rule 6 says that any such
>>> float must be below any such line box.
>>>
>>> Or am I misinterpreting what you're saying?
>>
>> Hmm, you're not misinterpreting me, but I must admit that I've
>> always ignored rules 5 and 6 in the context of the float being in a
>> different containing block from the non-floated block or line box
>> respectively. (Rule 5, however, is easily seen to hold when the
>> earlier box is a float, even in that situation.)
>>
>> Are we supposed to interpret those rules as saying that the top
>> margin of the float is adjusted (made negative) in the following
>> test case?
>>
>> <div>text</div>
>> <div style="margin-top:-50px">
>>      <div style="float:left; width:100px; height:100px;
>> background:yellow"></div>
>> </div>
>
> Ah, right.  So this is yet another case where implementations don't
> follow the spec (do they all match?), because the spec is written in
> terms of a set of constraints that's easy to map approximately to an
> algorithm, but hard to map precisely to an algorithm.
>
> I suspect we should (a) think about changing rule 6 and (b)
> simultaneously changing the rules about shortening line boxes to say
> that line boxes prior to the line box containing the placeholder to
> the float are not shortened.

Filed as Issue 229
   http://wiki.csswg.org/spec/css2.1#issue-229

~fantasai

Received on Friday, 4 March 2011 00:06:05 UTC