Re: [CSS21] Clearance paradox

fantasai wrote:
> On 03/22/2009 11:56 AM, Anton Prowse wrote:
>> Hi,
>>
>> I think CSS2.1 contains a paradox as regards clearance...
> 
> Combined proposal from this thread:
> 
> 9.5.2 Controlling flow next to floats: the 'clear' property
> 
> Change
>    # Clearance is introduced as spacing above the margin-top of an element.
>    # It is used to push the element vertically (typically downward), past
>    # the float.
> to
>    | Values other than 'none' potentially introduce clearance.
>    | Clearance inhibits margin collapsing and acts as spacing above the
>    | margin-top of an element. It is used to push the element vertically
>    | past the float.
> and shift to after value definitions.
> 
> Change
>    # The clearance of the generated box is set to the amount necessary to
>    # place the top border edge below the bottom outer edge of any
> to
>    | Requires that the top border edge of the box be below the bottom
>    | outer edge of any
> x3
> 
> Change
>    # then its clearance must be set to the greater of:
> to
>    | then clearance is introduced and must be set to the greater of:
> 
> Change
>    # The clearance can be negative.
> to
>    | The clearance can be negative or zero.
> 
> 8.3.1 Collapsing margins
> 
> Change
>    # An element that has had clearance applied to it never collapses
> to
>    | An element that has clearance never collapses
> 
> Change
>    # When an element's own margins collapse, and that element has had
>    # clearance applied to it
> to
>    | When an element's own margins collapse, and that element has clearance
> 
> Change last sentence of
>    # Explanation: Without the 'clear', the first and last paragraphs'
>    # margins would collapse and the last paragraph's top border edge
>    # would be flush with the top of the floating paragraph. But the
>    # 'clear' requires the top border edge to be below the float, i.e.,
>    # 2em lower. That means that the margins must not collapse and
>    # clearance must be added such that clearance + margin-top = 2em,
>    # i.e., clearance = 2em - margin-top = 2em - 3em = -1em.
> to
>    | This means that clearance must be introduced.  Accordingly,
>    | the margins no longer collapse and the amount of clearance
>    | is set so that clearance + margin-top = 2em, i.e.,
>    | clearance = 2em - margin-top = 2em - 3em = -1em.
> 

This looks fine!  (I particularly like the fact that the reordering of 
the prose, as given in the first section of the combined proposal, 
achieves a clean separation of the definition and purpose description of 
the 'clear' property from the clearance model being used to implement it.)

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Saturday, 24 April 2010 10:46:27 UTC