Re: Any plans to add a method for suppressing white space between inline-block elements?

On Sat, Nov 24, 2012 at 2:48 AM, Behrang Saeedzadeh <behrangsa@gmail.com> wrote:
> As you know, at the moment, in order to create a somehow readable HTML page,
> we either are forced to using comments or set the font-size of the parent
> element to 0 and set it back to 1rem or something similar:
>
> <div>
>    <div>foo</div><!--
> --><div>bar</div><!--
> --><div>baz</div>
> </div>
>
> I think we need a more elegant way for suppressing white space (or any text)
> inside an element (and not its children) in CSS.

As Phillippe said, the 'text-space-collapse' property, currently
sitting in Text 4
<http://dev.w3.org/csswg/css4-text/#white-space-collapsing>, addresses
this.

As Pete said, it's very likely that you're using inline-block here
just to achieve horizontal layout of some items, in which case Flexbox
is the correct answer to your problem.  That's what it was designed
for.  Flexbox is at this very moment being unprefixed in all major
browsers, so it should be usable in modern browsers sometime in 2013.

~TJ

Received on Saturday, 24 November 2012 16:12:02 UTC