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

Is this a consequence of `contain-intrinsic-size` or size containment? [Size containment](https://www.w3.org/TR/css-contain-2/#containment-size) says that 

> [Replaced elements](https://www.w3.org/TR/css-display-3/#replaced-element) must be treated as having an [natural](https://www.w3.org/TR/css-images-3/#natural-dimensions) width and height of 0 and no [natural aspect ratio](https://www.w3.org/TR/css-images-3/#natural-aspect-ratio).

[contain-intrinsic-size definition](https://drafts.csswg.org/css-sizing-4/#explicit-intrinsic-inner-size) says:

> These properties allow elements with [size containment](https://drafts.csswg.org/css-contain-2/#size-containment) to specify an explicit intrinsic inner size, causing the box to size as if its in-flow content totals to a width and height matching the specified [explicit intrinsic inner size](https://drafts.csswg.org/css-sizing-4/#explicit-intrinsic-inner-size) (rather than sizing as if it were empty).

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

In particular, in the codepen example (on Chromium), I can't get a different effect if I change contain-intrinsic-size to something like 800px 400px. It always remains a square.



-- 
GitHub Notification of comment by vmpstr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10116#issuecomment-2015936641 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:13:38 UTC