@tabatkins, can they use <<dimension-token>> to accept unitless values, or do they need to say it's either a <<dimension-token>> or a <<number-token>>? The railroad diagram seems to say that <<dimension-token>>s always have the unit, but those diagrams are also described as non-normative and I can't find the normative definition we'd pass to CSS/parse.
No, unitless values are <<number-token>>. So you can ask to parse as <<dimension-token>> | <<number-token>>, or just do the two parses yourself and check for failure between.
https://wicg.github.io/turtledove/#parse-an-adrender-dimension-value should use
[=CSS/parse=] as a <<dimension-token>>
. This would shorten the spec regardless of the outcome of #643, since that parsing step doesn't validate the unit values.@tabatkins, can they use
<<dimension-token>>
to accept unitless values, or do they need to say it's either a<<dimension-token>>
or a<<number-token>>
? The railroad diagram seems to say that<<dimension-token>>
s always have the unit, but those diagrams are also described as non-normative and I can't find the normative definition we'd pass to CSS/parse.