Re: [CSS21] inline span with clear

On 26/12/2012 13:38, Philippe Wittenbergh wrote:
> The last example in the spec uses an inline element (span) and
> applies the clear property to it. – the example then goes to show the
> span clearing the floated block:
> http://www.w3.org/TR/CSS2/visuren.html#comp-float
>
> However, higher up on the same page, the spec states, for the
> ‘applies to’ line: ‘block-level elements’ (a <span> is an inline
> element): http://www.w3.org/TR/CSS21/visuren.html#flow-control

Well spotted, Philippe!

This issue has been filed at 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20586

I propose fixing this by removing the #sibling span from the example, 
and instead wrapping the existing loose "End of body contents." in a 
span and setting that to "display:block; clear:right".

I think this is a better approach than setting "display:block" on the 
#sibling span; in either case you end up with block-inside-inline, but 
with the first approach you don't really notice because the inline 
doesn't resume after the clearing element and so the complexity doesn't 
really need pointing out in the example, whereas with the second 
approach you do notice and it probably does need explaining.

Cheers,
Anton

Received on Monday, 7 January 2013 14:32:03 UTC