Re: Issue 158 proposed text

On Fri, Jul 30, 2010 at 3:31 AM, L. David Baron <dbaron@dbaron.org> wrote:
> On Wednesday 2010-06-30 08:47 -0700, Tab Atkins Jr. wrote:
>> So, then, current proposal for fixing issue 158.  As a reminder, it's
>> meant to address the issue found at
>> http://wiki.csswg.org/spec/css2.1#issue-158 and replace the text found
>> at http://www.w3.org/TR/CSS2/visuren.html#flow-control .
>>
>> | Computing the clearance of an element on which 'clear' is set is
>> | done by first determining the hypothetical position of the element's
>> | top border edge within its parent block.  This position is
>> | determined after the top margin of the element has been collapsed
>> | with all appropriate adjoining margins per normal margin-collapse
>> | rules, except that the clearing element's top margin is not allowed
>> | to collapse with the clearing element's bottom margin.
>
> Saying that the top margin of an element can't collapse with its
> bottom margin is ambiguous, since there could be margins in-between
> the two, and you don't say at which point the collapsing breaks.
> The simplest such case is:
>  <div style="clear: left"><div style="margin-top: 100px"></div></div>
>
> The current spec says that the collapsing should be done as though
> the element has a nonzero top border width, and I think (based on
> the rationale you gave, not on the proposed spec text) you're
> proposing to change it to say that the collapsing should be done as
> though the element had a nonzero bottom border width.
>
> However, it's also not clear to me why you're proposing this change.
> I'm actually not even sure that you intended it.


I'm not sure to understand you correctly here, anyway I believe that
it is not well defined what the current spec intends about an adjacent
top margin of the first child of an element with clear.  This is
exactly my question [1] that, at least in part, originated issue 158.
As I told in [1] Firefox and Safari seem to "use" that child's top
margin in the hypothetical position computation.

So, in my view, reformulating the hypothetical position saying that it
is obtained as though the clear element had a nonzero _bottom_ border:
- is not a really a change because the current spec are not much consistent,
- better matches current behavior of good browsers.


Bruno


[1] http://lists.w3.org/Archives/Public/www-style/2010Jan/0509.html

-- 
Bruno Fassino http://www.brunildo.org/test

Received on Friday, 30 July 2010 21:13:20 UTC