[csswg-drafts] [css-images-4] object-view-box interaction with contain-intrinsic-size (#7187)

vmpstr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images-4] object-view-box interaction with contain-intrinsic-size ==
[`object-view-box`](https://drafts.csswg.org/css-images-4/#the-object-view-box) property says that

> When the element is painted, its contents are scaled and translated such that the element’s contents retain the same position and size, relative to the view box’s final size and position, that they had when the view box was determined (above).

My interpretation of this is that we use the element's natural size in conjunction with the viewbox size to do some math and figure out new positions and sizes. My question is what happens if the element has size containment and a specified [`contain-intrinsic-size`](https://drafts.csswg.org/css-sizing-4/#propdef-contain-intrinsic-size), which says that

> These properties allow elements with [size containment](https://drafts.csswg.org/css-contain-2/#size-containment) to specify an [explicit intrinsic inner size](https://drafts.csswg.org/css-sizing-4/#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 (rather than sizing as if it were empty).

So should the math that we do use the original element content size (say original image's natural dimensions), or should it use the `contain-intrinsic-size` "overrides". And in general, should size-containment and `contain-intrinsic-size` apply before the `object-view-box` property? I think that if there is size containment with _no_ `contain-intrinsic-size` then we would ignore the `object-view-box` property because it would have 0 intrinsic dimensions. Should be ignore the viewbox _even if_ there is `contain-intrinsic-size` or is it a matter of which sizes we use for computing the painted output dimensions/positions

I'm not sure if there is a important distinction between "natural" sizes and "intrinsic" sizes that should be called out.

/cc @khushalsagar @tabatkins 


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7187 using your GitHub account


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

Received on Thursday, 31 March 2022 15:13:58 UTC