W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css3-flexbox] handling whitespace between items in a flexbox

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 6 Apr 2012 17:10:18 -0700
Message-Id: <6521DEEF-2620-4642-A485-1D518C4E1845@gmail.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, www-style list <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Apr 5, 2012, at 4:20 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Thu, Mar 22, 2012 at 12:00 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
>> Hi www-style,
>> Currently, I don't believe the spec makes any mention of how to handle
>> whitespace between flexbox items. (whether it's ignored or counts as
>> "non-replaced inline children" and triggers an anonymous flexbox item)
>> Consider e.g. the following testcase:
>>  <div style="display: flexbox">
>>   <img>
>>   <img>
>>  </div>
>> My guess is that we'd that to only generate 2 flexbox items, right?
>> (rather than 5 items, which we'd get if we counted the whitespace at the
>> beginning / middle / end as anonymous-flexbox-item-worthy)
>> It'd probably be good to clarify this, as rendering engines _do_ generate
>> boxes for runs of whitespace in many cases (which are then sometimes
>> collapsed and sometimes not).
> I've added the following sentence to the third list item in the
> flexbox generation section: "If the contents of the anonymous box
> would be solely an anonymous inline containing only whitespace, the
> box is not generated, and the whitespace is removed from the box
> tree."

Wouldn't you want to also collapse away any whitespace before and after any untagged non-whitespace content?
Received on Saturday, 7 April 2012 00:10:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC