Re: [csswg-drafts] [css-flexbox][css-grid] Choose a single option for resolving padding and maring percent values of grid/flex items

> In addition to the above options, I'd like to add, since the stated reasoning by @tabatkins /Google of keeping this asymmetric was to allow the percentage padding hack for aspect ratio to work.

This isn't quite right. Our stated reason was that the aspect-ratio hack was the *only* significant case (that is, the only case that showed up in non-trivial numbers in our use-counters) for using % padding in the first place. Virtually nobody was using % padding for anything else at all.

Thus, there was no argument for making %s relative to each axis, besides a weak sense of theoretical purity ("what it should have been to start with").  And, since we can't change the behavior for block layout, that's directly clashing with the *other* theoretical-purity argument, that %s on padding should work the same in all display modes.

I agree that we should add an actual aspect-ratio feature; I have a (flawed) proposal for this [in my blog](https://www.xanthir.com/blog/b4810) *from 2010*.  But that has no bearing on this issue; we'll still be stuck with the weird % behavior in block layout for compat reasons, and there's no strong argument for making other layout modes have different behavior than this.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2085#issuecomment-350070096 using your GitHub account

Received on Thursday, 7 December 2017 19:30:34 UTC