8000 [css-typed-om] Reify color for CSSColorValue.parse · Issue #7174 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-typed-om] Reify color for CSSColorValue.parse #7174

@DevSDK

Description

@DevSDK

The spec [1] defines the parsing rule for 'CSSColorValue.parse':

  1. Parse cssText as a and let result be the result. If result is a syntax error, throw a SyntaxError and abort this algorithm.
  2. 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:

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0