Skip to content

[css-color-4] Concerns about color() function fallback #5931

@weinig

Description

@weinig

In thinking more about about how to implement the color() function fallback mechanism https://drafts.csswg.org/css-color-4/#color-function, I am becoming concerned with the implementation complexity required to implement this mechanism and wondering if that burden is warranted given the existing ability for authors to specify colors based destination gamut using media queries (https://www.w3.org/TR/mediaqueries-5/#color-gamut).

Additionally, I am not quite clear how well destination dependent fallback will work with upcoming features like color-mix(), https://drafts.csswg.org/css-color-5/#color-mix and color-adjust(), https://drafts.csswg.org/css-color-5/#coloradjust. Questions I have include things like would it make sense to apply the same transformations to all colors in the fallback list? Would authors need to be able to specify different transformers for each fallback color?

I know the spec authors are conscientious and wouldn't have included the fallback mechanism without a good reason, so I am curious what uses cases prompted it and whether they outweigh the concerns.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions