Skip to content

[css-color-5] Make all color components in Relative Color Syntax optional #6938

Closed
@LeaVerou

Description

@LeaVerou

Currently, when authors want to convert between color spaces, they need to do things like lch(from var(--color) l c h) or color-mix(in lch, var(--color) 100%, black 0%), both of which are awkward.

So, @svgeesus and I were discussing allowing for a no-arguments RCS that would allow things like lch(from var(--color)). But if we're going to have a syntax with 0 args and a syntax with N args, why not allow everything in between? This would allow authors to omit trailing components that are unchanged, allowing them to shorten things like lch(from var(--color) calc(l * 1.2) c h) to lch(from var(--color) calc(l * 1.2)).

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