W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: breaking overflow

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 1 Jan 2010 09:31:47 -0800
Cc: James Hopkins <james@idreamincode.co.uk>, Anton Prowse <prowse@moonhenge.net>, www-style <www-style@w3.org>, Niels Matthijs <niels.matthijs@internetarchitects.be>
Message-Id: <D03F5CD8-56F7-4453-8C78-7ECBA1888315@gmail.com>
To: Tab Atkins Jr. <jackalmage@gmail.com>

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 { 
   white-space-collapse: discard
LI { display:inline-block }

[1] http://www.w3.org/TR/css3-text/#white-space-collapse

Received on Friday, 1 January 2010 17:32:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC