-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Description
The spec does currently not describe any change to the var() substitution behavior. Hence I have been operating under the assumption that it works like in css-variables, except that instead of always substituting the specified value, you substitute a "synthetic" token stream equivalent to the computed value described in 2.4.
However, after reading issue #321, I think the spec definitely needs to deal with this explicitly.
<!-- --x is registered as <length> (inherited) -->
<div style="font-size: 10px; --x: 2em;">
<div style="font-size: 1px; height: var(--x);" id=inner></div>
</div>
What is the computed value of height
on #inner
in the example above? If we follow the current spec without reading between the lines, it's 2px
. Probably, what we want is 20px
. In any case, the spec should mention the correct behavior.