W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [css-flexbox] Flex box does not respect inline children/groupings

From: Stephen Hay <haymail@gmail.com>
Date: Wed, 19 Feb 2014 23:24:39 +0100
Message-ID: <CANPZ3DDDgPNruk6-5gFNA_0MCJon19xXZnsFVEpy2c3jMZ+V2g@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Www-style <www-style@w3.org>, Eric Eastwood <me@ericeastwood.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
> > (And it doesn't matter - inline-block is still an inline-level box,
> > same as display:inline itself.)
> I am not sure I understand you here.to be honest.
> inline-block establishes box, inline element is a run of
> glyphs/inline-elements - is not a box by itself.

An inline-block element is inline-level, but enjoys characteristics of
block-level elements.

> >
> >> I think that inline elements should stay inline - flexbox shall not
> >> try to change "boxing nature" of its children.

I don't understand the problem. Isn't the whole idea of declaring `display:
flex` on an element that its children can become flex items?

If so, then it seems logical that anonymous boxes of text become flex items
themselves as well.

> When you apply flexbox on span's container that span gets
> treated as boxed element loosing its display:inline nature.
> Check this,
> <html>
>   <head>
>     <style>
>       div.flex { display:flex; }
>       div span { border: 1px solid; }
>     </style>
>     <script type="text/tiscript"></script>
>   </head>
> <body>
>   <div>
>     The <span>quick brown fox jumps over the lazy</span> dog
>   </div>
>   <div class="flex">
>     The <span>quick brown fox jumps over the lazy</span> dog
>   </div>
> </body>
> </html>
> two divs here should be rendered in the same way.
> That's what Eric was asking about I believe.

To me, in this example, the whole point of making a flex container of the
containing div would be to have the following blocks become flex items:

- "The"
- <span>quick brown fox jumps over the lazy</span>
- "dog"

That would be the whole point of using flexbox here, right?

- Stephen
Received on Wednesday, 19 February 2014 22:25:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC