Re: [css3-text] Feature request: "white-space: ignore"

For consistency with other rules I would rather see it be called: white-space:
none, with the understanding that all whitespace within an element of this
style would be discarded/ignored.

> You can't fix "browsers are too slow in implementing!" by creating
more features.  ^_^  That's why you're getting pushback.  Flexbox is
the correct solution

While it's true that flexbox is the right solution for concepts such as
multiple columns, white space can still get in the way unintentionally.

Consider the following code:

    <style>
        .images {
            text-align: center;
        }
    </style>
    <div class="images">
        <img src="/path/to/image1.jpg" alt="lorem ipsum" />
        <img src="/path/to/image2.jpg" alt="lorem ipsum" />
        <img src="/path/to/image3.jpg" alt="lorem ipsum" />
    </div>

By default, these images will display each separated by a space character.
If the desired effect is to not have spaces between the images, the markup
needs to be changed, "fishy" syntax is commonly used at the expense of
readability:

    <style>
        .images {
            text-align: center;
        }
    </style>
    <div class="images">
        <img src="/path/to/image1.jpg" alt="lorem ipsum"
        /><img src="/path/to/image2.jpg" alt="lorem ipsum"
        /><img src="/path/to/image3.jpg" alt="lorem ipsum" />
    </div>

It would be much more convenient to be able to specify that white-space is
unnecessary:

    <style>
        .images {
            text-align: center;
            white-space: none; /* or ignore, or whatever it's called */
        }
    </style>
    <div class="images">
        <img src="/path/to/image1.jpg" alt="lorem ipsum" />
        <img src="/path/to/image2.jpg" alt="lorem ipsum" />
        <img src="/path/to/image3.jpg" alt="lorem ipsum" />
    </div>

Tim
☺


On Fri, Apr 19, 2013 at 1:50 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Fri, Apr 19, 2013 at 7:08 AM, Jon Ronnenberg
> <jon.ronnenberg@gmail.com> wrote:
> > Dear Alan and fantasai,
> >
> > I honestly don't understand your resentment against the proposed
> feature. As
> > to being pragmatic, even if Flexbox was supported today, it will take 2-3
> > years before it's viable technology to be used on www, based on browser
> > history[1] and what's in the pipe-line[2]. Basically we are waiting for
> IE10
> > to be obsolete and Saf6 (iOS6 also uses Saf6 which probably means
> iPhone3GS,
> > iPod4th, iPad3[3] is out) and things gets even worse on Android.
> >
> > Adding 'white-space:ignore' not only fixes an important omission from the
> > 'white-space'[4] property (as already noted in the spec), it is also a
> well
> > defined and understood issue which can be remedied by a simple shim.
> > Something that Flexbox can not. However, it doesn't make sense and is
> > against the idea of standardization to proceed with such a shim, without
> a
> > formal agreement or at least a sign of goodwill, in the W3C forum.
>
> You can't fix "browsers are too slow in implementing!" by creating
> more features.  ^_^  That's why you're getting pushback.  Flexbox is
> the correct solution, and it will be supported everywhere more quickly
> than a brand-new feature would be.
>
> ~TJ
>
>

Received on Friday, 19 April 2013 18:06:45 UTC