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

Re: [css-flexbox] Making percentage margins/padding consistent with Grid

From: Ojan Vafai <ojan@chromium.org>
Date: Wed, 6 Mar 2013 19:50:10 -0800
Message-ID: <CANMdWTvZJi2hqfdWm=Uo57mMK1PShvH5_dMe49WgA8-pjJPmmw@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
What are the use-cases for percentage margin/padding? The block approach is
easier to implement. I agree that flexbox and grid should be consistent
with each other, but unless we have actual use-cases, I don't see the
benefit (beyond theoretical purity) of diverging from the block behavior.
If anything, I'd rather we just not support percentage margin/padding for
new display types if we find the block behavior too distasteful.


On Wed, Mar 6, 2013 at 5:18 PM, Andrew Fedoniouk
<news@terrainformatica.com>wrote:

> Grid layout uses non-standard (for the rest of CSS) approach: percentage
> calculation there happens against imaginary box established by grid lines
> so auto width/height of the grid itself is not dependent of percentage
> calculations
> on its children strictly speaking.
>
> But even in grid case I am not sure actually what should happen with rows
> having min-content height when their children have
> height:120% in some cell. What would be the computed row height?
>
> --
> Andrew Fedoniouk.
>
> http://terrainformatica.com
>
>
>
> On Wed, Mar 6, 2013 at 2:10 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
> > Right now, Flexbox treats vertical percentage margins and paddings
> > same as block layout - they're resolved relative to the width of the
> > containing block.  Grid instead makes vertical margin/padding resolve
> > their percentages against the height of the containing block.
> >
> > I think this is a reasonable behavior, and would like to copy it into
> > Flexbox.  (In general, I'd like Grid and Flexbox to be identical in
> > these kinds of details unless there's a great reason for the
> > difference.)
> >
> > Thoughts?
> >
> > ~TJ and fantasai
> >
>
>
Received on Thursday, 7 March 2013 03:51:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT