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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 14 Mar 2013 16:57:47 -0700
Message-ID: <CAAWBYDD8zjsiO1PtGNJPyJ0yA3F8k5LcNDJOrs1P2WgqcWth-Q@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: Andrew Fedoniouk <news@terrainformatica.com>, www-style list <www-style@w3.org>
On Wed, Mar 6, 2013 at 7:50 PM, Ojan Vafai <ojan@chromium.org> wrote:
> What are the use-cases for percentage margin/padding? The block approach is
> easier to implement.

I don't understand how this is possible.  Why is it easier to compute
a percentage height than a percentage padding/margin?  The
calculations are identical.

The reason percentages on blocks work the way they do is because
blocks are nearly always auto-height, so in almost all cases
percentages can't be resolved, so resolving against the width instead
at least gives you *something* useful.  In flexbox, the height will
often be a definite size, so it makes sense for percentages on
vertical padding/margins to be consistent with percentages on heights.

~TJ and fantasai
Received on Thursday, 14 March 2013 23:58:34 GMT

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