[css-houdini-drafts] [css-properties-values-api] It is underspecified how relative values in registered properties resolve (#1045)

LeaVerou has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-properties-values-api] It is underspecified how relative values in registered properties resolve ==
### Example 1: Font-relative units

In [css-values-4](https://drafts.csswg.org/css-values/#font-relative-lengths), it is described that their value depends on which property they are used on. In [Properties & Values](https://drafts.css-houdini.org/css-properties-values-api-1/#calculation-of-computed-values), nothing describes how they are evaluated and whether they resolve to the current element font metrics or the parent metrics.

In my testing of the Chrome implementation, they appear to resolve to the current element metrics, and if the variable is used on `font-size` the behavior is similar to cycle detection in variables, and both the `font-size` declaration as well as the variable become IACVT. This is probably reasonable, but entirely undocumented.

Testcase: https://codepen.io/leaverou/pen/LYWdXeK

### Example 2: `currentColor`

In [css-color-3](https://drafts.csswg.org/css-color-3/#currentcolor) it is described how `currentColor` resolves differently based on which property it's used on.

In my testing, it appears to resolve based on `color`, and if the property is used on `color`, then it becomes `black`, *regardless of what its initial value is*.

Testcase: https://drafts.csswg.org/css-color-3/#currentcolor

---------

It needs to be specified what happens in these cases, because I think right now it's basically up to the implementation (unless I missed it, apologies in that case).

And once we specify this, we can also point to that resolution for whatever conditional syntax we come up with in https://github.com/w3c/csswg-drafts/issues/5624 .

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


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

Received on Wednesday, 9 June 2021 17:48:05 UTC