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

Re: [csswg-drafts] [css-grid] Note implies losing an aspect-ratio when it shouldn't? (#5713)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Sat, 14 Nov 2020 21:21:59 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-727267105-1605388918-sysbot+gh@w3.org>
I think in that case the stretching is not because of `justify-self: normal`. It's just that the fit-content size, according to https://drafts.csswg.org/css-sizing/#intrinsic-sizes,

> For boxes with a preferred aspect ratio, but no intrinsic size:
> If the available space is definite in the inline axis, use the stretch fit into that size for the inline size and calculate the block size using the aspect ratio.

Browsers already do this for
```html
<div style="display: grid; width: 100px; border: solid;">
  <svg viewBox="0 0 1 1" style="background: green; justify-self: start; align-self: start">
```
which has `start` alignment instead of `normal`, this shows the stretching is not due to `normal` behaving as `stretch`.



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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 14 November 2020 21:22:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC