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

Re: [css3-flexbox] requst for new features

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 2 Apr 2013 09:13:33 -0700
Message-ID: <CAAWBYDBR4rJqoWwx6LTiiuD_rJvzMygxHyRZz0LCznKVWHhdqg@mail.gmail.com>
To: 一丝 <yiorsi@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>, "kanghaol@oupeng.com" <kanghaol@oupeng.com>
On Mon, Apr 1, 2013 at 12:48 AM, 一丝 <yiorsi@gmail.com> wrote:
> I am a front-end developer from etao.com, as well as a member of the W3C
> HTML5 Chinese Interest Group.. I also participated in the Chinese
> translation of the CSS Flexible Box Layout Module[1].
>
> It's nice to see css3-flexbox improve a lot recently, such as the change of
> the default value of 'min-width/height' from 'auto' to '0'. However,
> whenever I am using multi-line flex layout, I often get frustrated by the
> lack of features, esp. the ability to control the last line. We know that
> there is 'text-align-last' in CSS3 for controlling the line alignment of the
> last line, but flex still does't have this control. There's
> 'justify-content', but there are problems.
>
> Problem 1: The alignment of the last line in a flex container

I'm planning to address this in the next level of Flexbox, because
that last line behavior is definitely bad for most scenarios.  My
current thoughts are to fill the last line with "phantom" boxes that
are the same size and flexibility as the last item, then flex
everything accordingly.  This will prevents the items on the last line
from getting blown up to a much larger size than the rest of the
items.

However, it sounds like what you really want is a flexible grid.  If
you know how many items should fit into a line, you can use Grid
Layout to achieve this - set up your grid appropriately, and use
grid-auto-flow to have them automatically find spaces to fit into.

> Problem 2: Distribute the remaining space between flex items in a flexible
> way

It sounds like you're asking for an ability to control the minimum
spacing, which is planned for Flexbox 2.

So, both of your requests are things I'm already planning to do, but
they'll wait for the next level of Flexbox.  This current level is
stabilizing and getting implemented, so I'm not planning to add
anything new to it.

Thanks!

~TJ
Received on Tuesday, 2 April 2013 16:14:21 UTC

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