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

On 05/09/2010 15:17, Alan Gresley wrote:
> 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.
>
>
> Not so, try narrowing the viewport with this test.
>
> <div>
> x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
> x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
> x x x x x x x x x x x x x x
> <span style="float: left; background: red;">float</span>
> <span style="background: lime;">x x x x x x x x x x x x x x</span>
> </div>

How about we assume that I haven't raised an issue that's invalidated by 
the most trivial imaginable test case of float behaviour, and hence that 
I'm not regarding the line box which contains the float placeholder as 
being earlier in the source than the float.

> What situations do you mean by where you write "and hence overlap the
> floats in many situations"?

<div>text</div>
<div style="margin-top:-50px">
 <div style="float:left; width:100px; height:100px; 
background:yellow"></div>
</div>


>> Issue 2:
>>
>> 9.5.1 says:
>> # 3. The right outer edge of a left-floating box may not be to the
>> # right of the left outer edge of any right-floating box that is to
>> # the right of it. Analogous rules hold for right-floating elements.
>>
>> This means a left float can be to the right of a right float. (They
>> need to be in different containing blocks in order to construct this
>> situation, obviously.) Fx3.6 agrees; I haven't tested in others. This
>> doesn't cause a problem, but I wanted to seek confirmation that this
>> was an intentional feature of the spec.
>>
>> Cheers,
>> Anton Prowse
>> http://dev.moonhenge.net
>
>
> This means that floats floated in opposite directions can not overlap
> each other if their combined width is greater than that of their
> containing block. If their containing block is narrowed or the floats
> width is increased, this can cause the float that is later in the source
> to drop below the earlier float.

Yes I'm perfectly aware of what the obvious intent of the rule is.  My 
question is whether the side-effect of the wording is also intentional.


Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Monday, 6 September 2010 18:16:19 UTC