W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-grid] aspect ratio units needed (#1173)

From: Daniel Tonon via GitHub <sysbot+gh@w3.org>
Date: Sat, 27 Jun 2020 00:24:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-650461538-1593217463-sysbot+gh@w3.org>
The other main scenario is wanting to style things based on the width/height of the element.

For example, it would be absolutely amazing if we could write this to create text that modifies in size based on the width of the element:

```css
.responsive-text {
  font-size: clamp(1rem, 2%w, 5rem);
}
```

`2%w` being the exact same value as what `width: 2%;` would equate to.

`2%h` would be the exact same value as what `height: 2%;` would equate to.

That isn't "aspect-ratio" though so maybe needs a separate ticket, or maybe we just rename this one?

-- 
GitHub Notification of comment by Dan503
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1173#issuecomment-650461538 using your GitHub account
Received on Saturday, 27 June 2020 00:24:25 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:28 UTC