[css-typed-om] Reify color for CSSColorValue.parse · Issue #7174 · w3c/csswg-drafts (original) (raw)
The spec [1] defines the parsing rule for 'CSSColorValue.parse':
- Parse cssText as a and let result be the result. If result is a syntax error, throw a SyntaxError and abort this algorithm.
- Reify a color value from result, and return the result.
So the 'result' passed to the second step.
However, the 9th in the second step [2] says:
- If val is any other color keyword, return the result of reifying as a CSSStyleValue val for prop.
But the prop is not passed from the first step.
How should we clarify the parsing rule about 'prop'?
Working CL: https://chromium-review.googlesource.com/c/chromium/src/+/3522201/comments/6b28bb4f_0c02a99e
cc. @xiaochengh
[1] https://drafts.css-houdini.org/css-typed-om-1/#dom-csscolorvalue-parse
[2] https://drafts.css-houdini.org/css-typed-om-1/#reify-a-color-value