Re: [CSS21] references incorrect

On Wednesday 2011-10-26 00:23 +0000, Arron Eicholz wrote:
[ reordered quoted text slightly]
> The references for the following tests are incorrect and the tests
> themselves are correct.

> http://test.csswg.org/suites/css2.1/20110323/html4/floats-rule7-outside-left-001.htm
> http://test.csswg.org/suites/css2.1/20110323/html4/floats-rule7-outside-right-001.htm
> 
> References:
> http://test.csswg.org/suites/css2.1/20110323/html4/floats-rule7-outside-left-001-ref.htm
> http://test.csswg.org/suites/css2.1/20110323/html4/floats-rule7-outside-right-001-ref.htm
> 
> All browsers seem to agree that the correct rendering is not what is in the reference.

I believe these tests are correct as-is per the current spec.
http://wiki.csswg.org/spec/css2.1#issue-101 was a proposal I made
(which Tab turned into spec text) to change the spec in this regard.
If my memory is correct (I'm jogging it based on what I wrote in
https://bugzilla.mozilla.org/show_bug.cgi?id=616334 ), we rejected
the proposal because Microsoft reported being able to change the
behavior without significant impact to Web-compatibility.

> The specific section in the spec is section 9.5.1 rule 7:
> 
> A left-floating box that has another left-floating box to its left
> may not have its right outer edge to the right of its containing
> block's right edge. (Loosely: a left float may not stick out at
> the right edge, unless it is already as far to the left as
> possible.) An analogous rule holds for right-floating elements.
> 
> Since the blue box is shifted over 100px by its parent margin and
> it's floated left it's as far to the left as it can go within the
> containing block and thus will overflow the containing block and
> not shift down like the reference expects. Thus the reference
> should be corrected for the test case.

The spec doesn't say anything about whether it's as far to the left
as it can go.  The spec only says that if it has another
left-floating box to its left (which it does) then it cannot stick
out on the right side of its containing block (which it does in most
browsers).

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 26 October 2011 00:42:45 UTC