Skip to content

[css-typed-om] toColor() intentionally restricted to predefined colors? #1030

Closed
@svgeesus

Description

@svgeesus

In 4.6 CSSColorValue objects, the toColor(colorspace) method states:

  1. If colorspace’s value is not one of the predefined colorspaces, throw a SyntaxError.

However, in CSS Color 4, the syntax of the color() function is:

<pre class='prod'>
	<dfn>color()</dfn> = color( [<<ident>> | <<dashed-ident>>] [ <<number-percentage>>+ ] [ / <<alpha-value>> ]? )
</pre>

while currently, CSSColorValue only handles the <ident> case and not the <dashed-ident> case.

Is this an intentional restriction, or an oversight? If intentional, what is the rationale?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions