Re: Issue 158 proposed text

On Mon, Jun 28, 2010 at 8:43 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Mon, Jun 28, 2010 at 11:01 AM, Bruno Fassino <fassino@gmail.com> wrote:
>> On Mon, Jun 28, 2010 at 6:50 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> I added language to make it clear I'm explicitly defering to the
>>> normal margin-collapse rules.  This isn't meant to be a special case;
>>> it should lay out the element *exactly* like it wasn't clearing at
>>> all.
>>>
>>> Is that sufficient?
>>
>>
>> It is not explicitly stated what margins are considered during this
>> collapsing to determine the hypothetical position.
>> It is said "preceding margins", but I don't think this is precise enough.
>>
>> Consider something like this:
>>
>> <div style="background: lime; border-top: 1px solid">
>>        <div style="float: left; background: blue; height: 50px; width: 100px"></div>
>>        <div style="clear: left">
>>                <div style="margin-top: 60px"></div>
>>        </div>
>> </div>
>> <div style="background: yellow">next</div>
>>
>> (you can see it at http://brunildo.org/test/margin-collapse-clear-child-7.html)
>>
>> Should the top margin of the child of the div with clear, after the
>> float, be considered in the computation of the hypothetical position?
>> It collapses with the (null) top margin of the clear, but does not
>> seem to be a "preceding" margin.
>>
>> However I doubt the intention is to really exclude it. At least
>> Firefox and Safari seem to behave as if it was considered in the
>> hypothetical position, and so as if no clearance was necessary here.
>
> Again, the intention is to collapse all margins exactly as they would
> normally be collapsed, as if clearance wasn't present.  Should I
> remove the word "preceding" or something, if that's causing the
> confusion?  Perhaps this would work better:
>
> """
> 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-collapsing rules.
> """
>
> ~TJ
>


Yes, without the word "preceding" there is no more confusion about its meaning.

The only problem is that I'm not sure that the intention is really to
have the hypothetical position the same as the one with _all_ margins
normally collapsed (i.e. the same as with clear: none).
In other words, I'm not sure if the word "preceding" was initially
there for any specific reason.

Consider this:

<div style="background: yellow">before</div>
<div style="background: lime">
	<div style="float: left; height: 50px; width: 100px; background:blue"></div>
	<div style="clear: left; margin-bottom: 100px"></div>
</div>
<div style="background: yellow">next</div>

(you can see it at http://brunildo.org/test/margin-collapse-clear-child-9.html)
What behavior do we want for this test case?
With the new formulation the top border edge of the clear should be
100px lower than the bottom of "before" (hypothetical position), but
then (since with clear there is no more collapsing with the parent
top) we should have other 100px below this position. Or something like
that... I'm not sure, but I believe we are not going to get a
"reasonable" rendering of this test case.


Bruno

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

Received on Monday, 28 June 2010 22:00:02 UTC