W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [CSS21] Issue 192 - floats and shortened line boxes

From: Anton Prowse <prowse@moonhenge.net>
Date: Thu, 17 Mar 2011 00:59:55 +0100
Message-ID: <4D814EFB.7060506@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
CC: "L. David Baron" <dbaron@dbaron.org>
On 16/03/2011 17:34, L. David Baron wrote:
> On Wednesday 2010-09-01 21:19 +0200, Anton Prowse wrote:
>>  From the f2f minutes[1]:
>>
>>> <glazou>  http://lists.w3.org/Archives/Public/www-style/2009Oct/0027.html
>
>>>   RESOLVED: Accept change for first issue, accept dbarons' change for
>>>             the second issue, third issue is invalid.
>>
>> I don't believe the third issue to be invalid, and I went into
>> rather a lot of detail in a later post[2] in the cited thread, in
>> addition to responding[3,4] to the purported counter-example that
>> Bert raised[5]. If Bert has a counter-example that he has not posted
>> to the list, please could he do so.
>
> So I think the third issue is certainly not ideal wording in the
> spec.  However, I think the case you're worried about (which it
> describes) is a case that other statements in the spec explicitly
> prevent from ever happening.
>
> In particular, the rules for positioning floats in 9.5 say:
>    # 6. The outer top of an element's floating box may not be higher
>    #    than the top of any line-box containing a box generated by an
>    #    element earlier in the source document.
>
>    # 8. A floating box must be placed as high as possible.
>
> (I'd note that we all interpret "element" in rule 6 to mean "element
> or part of element"... it would probably be good to make that a
> little clearer so it's clear how it applies to text.)
>
> Any layout that wraps content prior to the float, initially placed
> in the line box whose top is even with the top of the float, to a
> line after the top of the float, would violate rule (6).  Thus this
> layout is not allowed.  Therefore rule (8) ("must be placed as high
> as possible") is satisfied by placing the float even with the line
> *below* its "anchor point", since placement with the higher line is
> not possible since such a layout would violate rule (6).  In other
> words, the layout of:
>    <p>This is some text with<float>FLOAT</float>  a float.</p>
> as:
>    | This is some text with a |
>    | [FLOAT] float.           |
> is correct.

Precisely; this is exactly what I described in [1,2].

> So while the spec is unclear here, I don't think there is a bug or
> disagreement with implementations.

I never claimed otherwise!  It's the spec that's sloppy  writing 
something in 9.5 that, if not contradicts, then creates friction with 
9.5.1.  not the implementations.

   And I don't think your proposed
> s/first available/same/ really helps explain this situation much.

It's not intended to help explain.  It's just intended not to be 
misleading in the way that "first available" is.  I don't see how the WG 
can reasonably reject this change proposal.


Also, don't forget the example I raised near the bottom of [1]; there's 
more to this issue than just making my proposed change!  That example, 
formalized, is:

<div style="background:red; width: 66px"
	><span style="display:inline-block; width:50px; height:15px; 
background:blue"></span>
	<span style="display:inline-block; width:15px; height:15px; 
background:yellow"></span
 ></div>

<div style="background:red; width: 66px"
	><span style="display:inline-block; width:50px; height:15px; 
background:blue"></span>
	<span style="float:left; width:15px; height:15px; background:yellow"></span
 ></div>

See how the combined effect of Rules 6 and 8 make this test case a 
little different from your example, and also make the first sentence of 
9.5 incorrect:

   # A float is a box that is shifted to the left or right on the
   # current line.
..."or line above"?


[1] http://lists.w3.org/Archives/Public/www-style/2010Aug/0181.html
[2] http://lists.w3.org/Archives/Public/www-style/2010Sep/0053.html

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Thursday, 17 March 2011 00:00:28 GMT

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