Re: breaking overflow

On Thu, Dec 31, 2009 at 10:46 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Dec 31, 2009, at 6:18 AM, James Hopkins <james@idreamincode.co.uk> wrote:
>> 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.

Specifically, one of the common uses for float-containment is to make
a <ul> properly wrap around its floated <li> children in a horizontal
nav menu.  This problem will be solved properly by Flexbox or its
successor.  Another example: float-based layouts will completely
disappear once Template Layout gets implemented.  There's just no
competition.

>> 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?).

Well, we've got no problem will boolean properties, we just have a
problem with boolean *values*, because a property that's currently
boolean may be expanded to multiple values in the future.  So
something like float-contain:auto|contain would be appropriate.

I think the intent of float-contain and the related properties is to
give access to single specific aspects of BFC ability.  We just happen
to grab the whole bunch at once right now because that's how things
work - there's no particular reason, though, that float-containment
has to be related to margin collapsing.

~TJ

Received on Thursday, 31 December 2009 17:51:19 UTC