[csswg-drafts] [css-images] Definition of cross-fade() natural dimensions seem to contradict definition of natural dimensions (#11203)

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

== [css-images] Definition of cross-fade() natural dimensions seem to contradict definition of natural dimensions ==
The current definition of the [natural dimensions of a cross-fade()](https://drafts.csswg.org/css-images-4/#natural-dimensions-of-a-cross-fade) require knowledge of the context in which the cross fade is being used. Specifically step 2.2. states:

> 2.2. Run the [object size negotiation](https://www.w3.org/TR/css-images-3/#object-size-negotiation) algorithm for the [<image>](https://drafts.csswg.org/css-images-4/#typedef-image), as appropriate for the context in which the [cross-fade()](https://drafts.csswg.org/css-images-4/#funcdef-cross-fade) appears, and set item’s width and height to the width and height of the resulting [concrete object size](https://www.w3.org/TR/css-images-3/#concrete-object-size).

This seems to contradict the definition of [natural dimensions](https://www.w3.org/TR/css-images-3/#natural-dimensions), which are defined, which state:

> These natural dimensions represent the preferred sizing intrinsic to the object itself; that is, **they are not a function of the context in which the object is used**.

(emphasis added).

<hr>

From an implementation standpoint, it is useful to have [natural dimensions](https://www.w3.org/TR/css-images-3/#natural-dimensions) be context independent, as it allows for better separation of concerns. 

From a spec standpoint, it seems plausible that a spec could use the natural dimension of a CSS image without the context being known yet and therefore, making use of cross-fade() impossible there.

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


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

Received on Wednesday, 13 November 2024 18:51:07 UTC