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

[CSS21] Objection over Issue 203 (clearance and hypothetical position) (Was: Re: [CSS21] Clearance - the missing manual)

From: Anton Prowse <prowse@moonhenge.net>
Date: Thu, 17 Mar 2011 23:40:14 +0100
Message-ID: <4D828DCE.5030605@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
CC: Arron Eicholz <Arron.Eicholz@microsoft.com>, "L. David Baron" <dbaron@dbaron.org>, fantasai <fantasai.lists@inkedblade.net>
On 12/03/2011 00:00, Arron Eicholz wrote:
> On Sunday, August 15, 2010 12:30 AM Anton Prowse wrote:
>> Yes... but oddly it's not /that/ position that's used.  It's a different position,
>> this time defined as where it would be (relative to the
>> canvas) if the clearing element really did have a non-zero *top* border.
>> Why?
>> ====
>> Because there's an error in the spec!  Stay tuned for the follow-up, in which
>> we demonstrate precisely why this part of the spec is just silly...
> Thank you for your feedback. The CSSWG resolved not to make changes to the CSS 2.1 specification[1].
> We have determine that the spec is not incorrect based on the following logic from this email[2]. Additional changes have been made to the relevant test cases so the cases match the specification.

> [2] http://lists.w3.org/Archives/Public/www-style/2010Dec/0474.html

I'm deeply unhappy with the current resolution of Issue 203.

The post cited above seems to have been instrumental to the current 
resolution, yet the the first part of it doesn't contain any information 
beyond the fact that all major browsers behave in the same way on a 
certain test case.  (Specifically, as is well known, they all fail to 
perform the second calculation called for by the current spec.)  Note 
that I replied to the post already in [1], making precisely that point.

The second part of the cited post concerned the Acid2 test.  I didn't 
(and still don't) understand what point Arron was trying to make about 
that test, and so I didn't respond to that part in my original reply. 
What I can now say for sure is that it's a complete red herring as far 
as Issue 203 is concerned!

The Acid2 test boils down to the following test case insofar as the 
interaction of clearance and margin collapsing is concerned.  (For 
convenience, div.forehead and div.smile's child have been given a green 
background, and the translation of div.smile's child through relative 
positioning has been removed.)

<!DOCTYPE html>
<div class="picture" style="border:12px solid gray">
	<div class="forehead" style="width:96px; height:12px; margin:48px; 
	<div class="nose" style="float:left; width:144px; height:36px; 
margin:-24px 24px -12px; border:solid black; border-width:0 12px 
	<div class="empty" style="margin:75px"
		><div style="margin:0 24px -72px 48px"></div
	<div class="smile" style="clear:both; margin:60px 36px"
		><div style="width:144px; height:24px; margin-top:3px; 

Suppose we set clear:none on div.smile, and calculate the hypothetical 
top border position as follows.  If div.smile had a non-zero bottom 
border, this border would be flush with the bottom of the green child. 
In such a situation, the green child's top margin collapses with 
div.smile's top margin, and so div.smile's top border position would be 
flush with the top of the green child.  This is the hypothetical top 
border position called for by the current spec.  But since the 
assumption of a non-zero bottom border didn't actually have any bearing 
on the top border, this position exactly the same as the /real/ top 
border position when we remove the assumption of a non-zero bottom border.

Hence this test case does nothing to distinguish the current spec from 
my proposed new definition of hypothetical position (viz. hypothetical 
position == real position) and so this test case is *irrelevant* to 
Issue 203.

(Note that I didn't actually go to the trouble of calculating the 
hypothetical position with respect to the canvas, because my point is 
clear without needing to do so.)

So, to conclude, neither the test cases analyzed by Arron nor the Acid2 
test offer any insight into Issue 203, which specifically concerns how 
the need for clearance should be determined.

I ask that the WG reopen Issue 203 and re-evaluate it without reference 
to that cited, irrelevant post.  The Minutes and Resolutions in [2] seem 
to indicate that the WGs currently proposed resolution is not based on 
the cited post anyhow, and is instead arose from an e-mail that David 
Baron wrote to Ian Hickson.  I request that the points from that e-mail 
be presented publicly on this mailing list, since it's beginning to seem 
that Issue 203 has been hijacked by a different issue which has not yet 
been made public, and resolved with a proposal that bears no obvious 
relationship to the original problem.

The thing that Arron was /actually/ interested in within the cited post 
is that the major browsers interoperably ignore the second clearance 
calculation.  The tests in the test suite reflected the current spec, so 
presumably none of the browsers passed.  But instead of modifying the 
test suite (which Arron was proposing and, for all I know, has already 
done) the WG should instead decide whether they think the second 
calculation is valuable.

Personally, I think it is.  It addresses the case where the float moves 
upwards after interrupting margin collapsing.  It would be strange to 
move the clearing element upwards to follow it, since prior to clearing, 
the clearing element was as low down as it was for good reason: sensible 
margin collapsing with surrounding in-flow elements.  The WGs stated 
constraint for the clearance concept is that there be no unexpected loss 
or addition of whitespace; the second calculation plays a supporting 
role with that.

As regards Acid2, the second calculation doesn't even come into play 
there, so I'm at a complete loss about what point Arron is trying to 
make about that test.

[1] http://lists.w3.org/Archives/Public/www-style/2011Feb/0075.html
[2] http://lists.w3.org/Archives/Public/www-style/2011Jan/0644.html

Anton Prowse
Received on Thursday, 17 March 2011 22:40:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:44 UTC