Skip to content

[css-color] handling of powerless and missing components #1334

Open

Description

@romainmenke

Description

Browsers do not handle powerless and missing components correctly in interpolation or relative color syntax.

This covers both color-mix, relative color syntax and gradients.

This is important to fix as soon as possible because there is no way to detect support for the correct implementation through @supports.

Specification

https://drafts.csswg.org/css-color-4/, https://drafts.csswg.org/css-color-5/

web-feature

color-mix
color-mix-variadic
gradient-interpolation
relative-color

Test Links

https://wpt.fyi/results/css/css-color/parsing/color-computed-none.html?label=master&max-count=1
https://wpt.fyi/results/css/css-color/parsing/color-computed-powerless.html?label=master&max-count=1

Some tests are also present in, but the core aspects around none and powerless components are tested in the files linked above
https://wpt.fyi/results/css/css-color/parsing/color-computed-relative-color.html?label=master&max-count=1
https://wpt.fyi/results/css/css-color/parsing/color-computed-color-mix-function.html?label=master&max-count=1

Additional Signals

No response

Activity

  1. github-actions commented on Sep 3, 2026

    @github-actions

    This comment was automatically generated based on the information you provided. Please don't edit it.

    Below is additional information about the web features (from the web-features project) which are referenced in your proposal.
    If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
    To find feature IDs, use the web-features explorer.

    color-mix()

    Feature color-mix()

    color-mix() with three or more colors

    Feature color-mix() with three or more colors

    • ID: color-mix-variadic
    • Name: color-mix() with three or more colors
    • Description: The color-mix() CSS function accepts three or more colors.
    • Baseline status: Limited Availability
    • Developer signals: 7 votes (details)
    • More information: See the web-features explorer
    Gradient interpolation

    Feature Gradient interpolation

    Relative colors

    Feature Relative colors

  2. svgeesus commented on Sep 11, 2026

    @svgeesus

    @romainmenke you might want to add those web features to your initial post (I can't edit it)

  3. jgraham commented on Sep 11, 2026

    @jgraham
    Contributor

    Of those web-features most seem to be fully supported everywhere already. Linking to lots of features that seem to already be widely available doesn't help the decision making process much.

    If this is about one or more bugs in the implementation of existing features the best thing would be to link to browser engine bug reports covering the problem.

    If this is about an addition on the spec side that's not yet supported the ideal thing would be to have a feature covering that specific addition. That may not yet exist; if so it's OK to say that and we could help get the feature created. If there's already an MDN page or compat table covering the missing functionality linking to that would also be very helpful.

  4. romainmenke commented on Sep 11, 2026

    @romainmenke
    Author

    This isn't a new addition to the spec.
    Most accurate to say that browsers implemented this incorrectly 😅

    There is an existing MDN section: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value#missing_color_components
    and a bit further down the page: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value#interpolation_with_missing_components

    What has changed recently is that the spec has been improved and clarified in various ways and that there is a lot more test coverage. Adding it to interop will hopefully push implementors to fix this soon and around the same time.

    I think it's fine to create a web feature for this specifically.
    But important to make the distinction between "browsers implemented something" and "browsers implemented the correct thing". For example all browsers have support for the none keyword and yet no browser does this correctly.

  5. svgeesus commented on Sep 11, 2026

    @svgeesus

    Of those web-features most seem to be fully supported everywhere already. Linking to lots of features that seem to already be widely available doesn't help the decision making process much.

    Yes, the easy cases are well supported and baseline. This is about the (small, but important) harder, or more recently clarified, parts that are poorly supported, and hinder content authors who expect them to work.

  6. svgeesus commented on Sep 11, 2026

    @svgeesus

    @weinig do you have opinions on this proposed focus area?

  7. svgeesus commented on Sep 11, 2026

    @svgeesus

    Even for color-mix(), which of the four current web features has the highest baseline rating of Widely Available, the sea of red in these specific tests and the overall pass rates could hardly be claimed to be "fully supported everywhere".

    Subtest Total | 197/678 | 197/678 | 291/678 | 410/678
  8. weinig commented on Sep 13, 2026

    @weinig

    For example all browsers have support for the none keyword and yet no browser does this correctly.

    Are you saying you think the browsers engines have fundamentally wrong implementations of none, or just that there are bugs / not all browsers have kept up with changes to the spec?

    The biggest blind spot for me when it comes to none is with relative color syntax + calc(). I don't recall where the specs stand on this actually. Last I recall, there wasn't consensus on how it should work, due to having to deal with analogous components of different scales (like between oklab and lab). If it would be useful, we could implement the non-calc support (that is, oklab(from oklab(none none none) l a b) == oklab(none none none)) but wasn't clear to me if that was useful without the calc support. Doing this would be pretty trivial.

  9. romainmenke commented on Sep 13, 2026

    @romainmenke
    Author

    Are you saying you think the browsers engines have fundamentally wrong implementations of none, or just that there are bugs / not all browsers have kept up with changes to the spec?

    With my author hat on, I am unsure if the distinction between "fundamentally wrong" and "there are bugs" matters. It doesn't work as intended by the spec and makes common use cases for authors unpredictable or impossible. But I don't have a strong opinion on how we classify or document this.

    One of the biggest issues and causing the largest number of WPT failures is indeed eagerly converting none to 0.

    Other meaningful additions/changes to the spec were:


    Doing this would be pretty trivial.

    That is great to hear!


    Yes, none in calc() is out of scope.
    I also have no idea how that would work (both for implementers and for authors) and if that would actually be useful. I get the underlying idea that preserving none as much as possible is good but I share your concerns that the scales are completely different between different notations.

  10. romainmenke commented on Oct 9, 2026

    @romainmenke
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions