[csswg-drafts] [css-anchor-position] Is `anchor()` fallback used when outside of inset properties? (#10950)

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

== [css-anchor-position] Is `anchor()` fallback used when outside of inset properties? ==
I presumed that the [`anchor()`](https://drafts.csswg.org/css-anchor-position-1/#anchor-pos) function is added as a new type to insets e.g. `auto | <length-percentage> | <anchor()>`.

However, the [validity section](https://drafts.csswg.org/css-anchor-position-1/#anchor-valid) mentions that the anchor function is valid if, among other things, is used in inset properties, and that if it's invalid, it will resolve to its fallback value (If provided). This could be read as `<anchor()>` being part of `<length-percentage>`, I think.

So does it mean something like `width: anchor(--foo left, 10px);` will resolve to `width: 10px` or `width: initial`? Could see this happening through unregistered properties/trying to use these functions outside of the applicable properties (e.g. #9827)

Same question applies to `anchor-size()` applied outside of sizing/margin/inset properties.


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


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

Received on Thursday, 26 September 2024 13:09:18 UTC