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

On 04/06/2012 05:10 PM, Brad Kemper wrote:
> Wouldn't you want to also collapse away any whitespace before and after any untagged non-whitespace content?

I don't think so, no.

If the "white-space" propety has its normal value, then it doesn't
matter whether we collapse leading/trailing whitespace -- it's at the
beginning or end of a block (the anonymous flexbox item), and I think
the block will collapse it for us.

Note that the following two divs will render identically (with
white-space at its default value):
    <div>abc</div>
    <div>
      abc
    </div>
...which means we don't have to beautify our anonymous flexbox items to
make them look like the first div.

Now, if we've got "white-space: pre", then I'd say we explicitly do
_not_ want to collapse the leading/trailing white-space, since the
author presumably wanted it there.

So -- it's safest to just leave leading/trailing whitespace uncollapsed,
IMHO.

~Daniel

Received on Saturday, 7 April 2012 00:23:12 UTC