- From: Marat Tanalin <mtanalin@yandex.ru>
- Date: Sat, 19 Oct 2013 06:13:05 +0400
- To: Bruno Racineux <bruno@hexanet.net>
- Cc: "www-style@w3.org" <www-style@w3.org>
19.10.2013, 05:16, "Bruno Racineux" <bruno@hexanet.net>: > On 10/18/13 1:28 PM, "Marat Tanalin" <mtanalin@yandex.ru> wrote: > >> 18.10.2013, 19:48, "Tab Atkins Jr." <jackalmage@gmail.com>: >>> Getting a container element to contain its floats has been addressed >>> directly in the Sizing spec, though it hasn't gotten implementation >>> yet. You can set "min-height: contain-floats;" to make it work: >>> <http://dev.w3.org/csswg/css-sizing/#the-contain-floats-value>. >> `min-height: contain-floats` looks somewhat interesting, but what if a >> web developer needs for an element to have both self-clearing _and_ some >> numeric `min-height`? > > I can't really see such a practical case. The whole point of clearing > floats is to let the floats define your min-height. The min-height become > that of the children elements. In practice, `min-height` has nothing to do (or at least has much more not to do than to do) with clearing floats (other than well-known hasLayout bug of the dead IE7 ;-). `min-height` is used to set a minimal _height_ of an element (e.g. to make an element's height greater or equal to height of its background image that may by design be required to be shown entirely -- this has nothing to do with clearing floats). Clearing floats is used to prevent _bleeding_ descendant floated blocks through the _bottom edge_ of their container. Both needs can easily _coexist_ to the same extent as `color` can coexist with, say, `margin`. Trying to unite things that have different purposes is a wrong way. Self-clearing should have its dedicated property intended for self-clearing itself.
Received on Saturday, 19 October 2013 02:13:39 UTC