Re: Issue 158 proposed text

Never mind; elika's pointed out a case that my new text misses.  I'll
try it again with a more minimal rewrite in the morning.

~TJ

On Thu, Jun 3, 2010 at 4:51 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> This is meant to resolve issue 158: http://wiki.csswg.org/spec/css2.1#issue-158
>
> In this issue, Anton Prowse points out that the phrasing in section
> 9.5.2 is confusing.  Specifically, the phrase "these margins" is used
> to refer to margins mentioned two paragraphs previous, when there is
> at least one other margin mentioned between those two points.  This is
> an attempted rewrite of this section to resolve the ambiguity and make
> the entire clearance section clearer.
>
> Delete the text in 9.5.2 from "Computing the clearance on an
> element..." to the end of the note after the bulleted list.  Replace
> it with this text:
>
> """
> 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.  When computing this position,
> collapse all appropriate margins.
>
> If the top border edge of the cleared element at this hypothetical
> position is flush with or below the bottom outer edge of the lowest
> relevant float, then nothing else needs to be done.  No clearance is
> added.
>
> Otherwise, recompute the hypothetical position, but this time do not
> collapse the element's top margin with any margins above it.  Collapse
> any other appropriate margins.  Then set the clearance equal to the
> amount necessary to make the top border edge of the cleared element
> flush with the bottom outer edge of the lowest relevant float.  (The
> clearance amount may be negative, if the new hypothetical position
> would place the top border edge of the element below the bottom outer
> edge of the lowest relevant float.)
> """
>
> As well, delete the explanatory paragraph immediately below the
> example, and replace it with the following text:
>
> """
> 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.
> Recomputing the position of the last paragraph without letting the
> margins collapse then places the top border edge of the last paragraph
> 7em (4em + 3em) below the border edge of the first paragraph, or 1em
> below the bottom outer edge of the float.  So, the clearance must be
> set to -1em to bring the border edge of the last paragraph flush with
> the bottom outer edge of the float.
> """
>
> This should definitely be clearer, and I *believe* it describes the
> exact same behavior as the current spec.
>
> ~TJ
>

Received on Friday, 4 June 2010 01:19:12 UTC