W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

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

From: Daniel Tonon via GitHub <sysbot+gh@w3.org>
Date: Wed, 20 Dec 2017 14:34:22 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-353078612-1513780461-sysbot+gh@w3.org>
Oooh `margin-bottom: 20%w` and `margin-bottom: 20%h` sounds like an awesome idea. It lets us have more fine tuned control over how we want the percentages calculated.

Making `%w` and `%h` actual generic unit types would also solve the aspect ratio issue. You could do something like `height: 50%w` to create a `2/1` ratio container :)

As for what `%` would equal in flex and grid, I'm not really sure :/

>From a logical sense, I like the idea of basing it off the same axis. From a practical sense though, if I say `padding: 10%;` I would expect equal padding around all sides of the container :/

GitHub Notification of comment by Dan503
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2085#issuecomment-353078612 using your GitHub account
Received on Wednesday, 20 December 2017 14:34:24 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC