Re: [CSS21] Clearance error - hypothetical border edge should be actual border edge (Was: Re: [css2.1] Issue 158 and Issue 178 Resolution)

I've not been able to follow all the latest details of this
discussion, anyway I've two naive questions.

On 08/23/2010 03:40 PM, fantasai wrote:
>
> # 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. <del>This position is
> # determined after the top margin of the element has been collapsed
> # with previous adjacent margins (including the top margin of the
> # parent block).</del> <ins>This position is the same as the where
> # the actual top border edge would have been if the element had a
> # non-zero top border and its 'clear' property had been 'none'.</ins>


Is "top" in the above last line intended? If yes, I must have missed
something, since I thought the discussion was moving toward using
"bottom" there.



On 08/23/2010 7:23 PM, Anton Prowse wrote:
>
> I suggest the
> following change to resolve both this issue and Issue 158:
>
>  # 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<del>. This position is
>  # determined after the top margin of the element has been collapsed
>  # with previous adjacent margins (including the top margin of the
>  # parent block).</del> <ins>as if the value of its 'clear' property
>  # had been 'none', as per the rules in 8.3.1.</ins>
>  #
>  # If this hypothetical position of the element's top border edge is
>  # not past the relevant floats, then clearance <del>must be</del>
>  # <ins>is introduced and margins collapsed anew according to the rules
>  # in 8.3.1.
>  #
>  # Then the amount of clearance is</ins> set to the greater of:
>  #
>  # 1. The amount necessary to place the <ins>top</ins> border edge of
>  #    the block even with the bottom outer edge of the lowest float
>  #    that is to be cleared.
>  # 2. <del>The amount necessary to make the sum of the
>  #    following...</del>
>  #    <ins>The amount necessary to place the top border edge of the
>  #    block at the previously-computed hypothetical position.</ins>


I remember we already discussed the idea to use full (normal) margin
collapsing to compute the hypothetical position, and we saw this
produces "unexpected" results in some cases, like this one:

<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>

Unless I'm missing something, your formulation still produces an
"unexpected" result here.

So it's ultimately an arbitrary decision to take a formulation or
another, we will probably always have some unpleasant results in some
cases.


Bruno

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

Received on Wednesday, 25 August 2010 15:47:45 UTC