W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-flexbox] about flexible margins and alignment

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 5 Jan 2012 13:22:50 -0800
Message-ID: <CAAWBYDBVgP_4tbZxXL7hu3+pFQGbMRP9_9fK5uXEFdXRC6iqKA@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Andrew Fedoniuok <news@terrainformatica.com>, "www-style@w3.org" <www-style@w3.org>
On Thu, Jan 5, 2012 at 12:45 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> You are using invalid HTML and non-existent CSS properties, but if I can guess what you are asking - no, there is no easy way to create equal spacing between and around items in flexbox.
>
> It can be done with a grid though, and it seems appropriate. Grid gives a lot of control for empty space:
>
>    <div style="display:grid; grid-columns:1fr auto 1fr auto 1fr">
>        <button style="grid-column:2">Send</button>
>        <button style="grid-column:4">Delete</button>
>    </div>

It would also be trivial to add this to flex-pack, if we had a decent
name for it.  If we did so, we may want to address the case where the
first/last packing spaces are half-size (similar to using
non-collapsing margins) as well.

~TJ
Received on Thursday, 5 January 2012 21:23:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT