Re: [csswg-drafts] [css-images-4] Should `contain-intrinsic-size` affect `object-fit`? (#10116)

> It always remains a square

Open devtools and set `display: none`, then unset it.

> Is this a consequence of `contain-intrinsic-size` or size containment?

Size containment, which may be affected by `contain-intrinsic-size`.

> I couldn't find the reference for contain-intrinsic-size and natural size interactions.

See the resolution in https://github.com/w3c/csswg-drafts/issues/7519#issuecomment-1202721367.

But as I argued in https://github.com/w3c/csswg-drafts/issues/6257#issuecomment-850709682, this is just for sizing the `<img>`. Once we know it's size, the spec says to lay out normally. So `object-fit` should work. And since the example uses `width` and `height`, `contain-intrinsic-size` should have no effect at all.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 22 March 2024 21:58:11 UTC