Re: breaking overflow

On Dec 31, 2009, at 6:18 AM, James Hopkins <james@idreamincode.co.uk>  
wrote:

> My point being, is that CSS has never featured an established,  
> adequate mechanism for clearing floats in this manner.

CSS has the 'clear' property for clearing floats. It works pretty well  
for the types of floats envisioned when the 'float' property was  
created (for pictures, pull quotes, drop caps, etc. and not so much  
for full page layouts with floats inside other floats).

> Up until now, authors have been forced to adopt a workaround borne  
> out of findings from authors (generated content), or use properties  
> for the sole purpose of utilizing that property's side-effect (BFC).

We authors have adopted this workarounds because our use of floats in  
this way is itself a workaround, due to the lack of other, more  
sanctioned ways of laying out page content. As the  new CSS3 layout  
methods are implemented and become practical choices for us, these  
hacks will be less needed.

> Creating a control that could establish a BFC and includes no other  
> behavioral characteristics, is what's lacking here.

Yes, it does seem like a useful control, at least in the relatively  
short term, and I wouldn't think it'd be that hard to implement  
quickly (once there is concrete proposal of what form it should take).  
But I'm not an implementor, so I can't say for sure.

> Also, current methods are wholly unintuitive to authors learning  
> CSS; adding a property named 'float-contain' (or something along  
> those lines) would provide a far greater clue to authors as to  
> exactly what that control does.

Hmm. What would the value of that property be? CSS tends to shun  
simple Boolean values like true|false or yes|no. Also, it's not just  
about clearing floats; it's also about non-collapsing margins (and  
maybe other uses too?).

Received on Thursday, 31 December 2009 16:47:29 UTC