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

Re: [css-flexbox] Width computation for flex items with margin

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 12 Apr 2013 08:05:34 -0700
Message-ID: <CAAWBYDDcND2dsaNDo_Y=CTiCxv4JBygTkPKvXvKSpBTuPGw=nA@mail.gmail.com>
To: soenke.sothmann@oio.de
Cc: Daniel Holbert <dholbert@mozilla.com>, steve.greig1@gmail.com, www-style list <www-style@w3.org>
On Fri, Apr 12, 2013 at 7:05 AM, Sönke Sothmann <soenke.sothmann@oio.de> wrote:
> Thanks to you all!
> That clarifies what's going wrong.
> Too bad it is possible with the flex basis workaround only.
> While I'm happy to have a working way to build the grid, it isn't very declarative.
> Is there any chance that we could get margins be included in the width computation?
> Either by the flexbox spec or maybe with box-sizing?

It's not as simple as "include margins in the width computation".
Your problems isn't margins, it's the *loss* of margins that occurs
when you have an element spanning two "cells" in your flexbox.  You
don't actually want margins here, you want some concept of a "gutter"
and of "cells".  This is fundamentally a grid concept, not a flexbox

> Looking forward to have CSS3 Grid Layout implemented in the browsers. Hopefully it arrives in 2013.

Yup, spec is nearly done, IE has an early implementation already, and
Chrome should finish its implementation before the end of the year.
I'm really excited about it too!

Received on Friday, 12 April 2013 15:06:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:28 UTC