Skip to content

[css-color-5] Consider moving colorspace parameter in color-adjust() to beginning to match color-mix() and ease parsing #6053

Closed
@weinig

Description

@weinig

In the current CSS Color 5 draft's color-adjust() function, https://drafts.csswg.org/css-color-5/#coloradjust, the colorspace is argument is last, which is inconsistent with color-mix(), where it is first, and makes parsing a bit more complicated since we don't know which adjusters are allowed until after we have parsed them.

Please consider moving the colorspace to the beginning, changing the grammar from:

color-adjust() = color-adjust( <color> [ color-adjuster <colorspace>? ]? )

to

color-adjust() = color-adjust(<colorspace>?, <color> [ color-adjuster ]? )

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