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

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
one.

> 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!

~TJ

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