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

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 UTC