On Dec 31, 2009, at 10:57 AM, Tab Atkins Jr. wrote:
> On Thu, Dec 31, 2009 at 12:38 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On Dec 31, 2009, at 9:50 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>
>>> 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.
>>
>> It's solved pretty easily by using 'display:inline-block' instead of floats.
>
> In many cases, yes. Not in all. Frex, unless you code your HTML in a
> very specific and bizarre way, you'll still have spaces between <li>s
> caused by the whitespace in the code. Sometimes that's good,
> sometimes not. Floating ignores that, as does flexbox.
Well then, we still need "white-space-collapse: discard" [1], if you want to use it with that "specific and bizarre" HTML. What else you got?
Floating has its own other problems too, when used to create what is really more like a run of inline blocks than what "float" was actually created for. For instance, it doesn't allow you to center the LI elements, as you can easily do with inline blocks:
UL {
display:block;
text-align:center;
white-space-collapse: discard
}
LI { display:inline-block }
[1] http://www.w3.org/TR/css3-text/#white-space-collapse