Skip to content

[css-color-hdr] dynamic-range-limit-mix() should take an arbitrary number of components (like color-mix(), calc-mix(), etc.) #14454

Open

Description

@weinig

Currently, dynamic-range-limit-mix() only supports taking exactly two mix components, much like color-mix() did in the past.

To match the other mix functions, it should be updated to support an arbitrary number of mix components.

(This is the same issue as #14452 but for dynamic-range-limit-mix() rather than palette-mix()).

cc @svgeesus

Activity

  1. svgeesus commented on Sep 7, 2026

    @svgeesus
    Collaborator

    Agreed. The prose already says that:

    This function takes one or more dynamic-range-limit values,

    but the grammar needs to be updated.

  2. svgeesus commented on Sep 7, 2026

    @svgeesus
    Collaborator

    WPT need to be reviewed for this change

  3. weinig commented on Sep 7, 2026

    @weinig
    ContributorAuthor

    @svgeesus how about making the <percentage> optional as well, to match the other mix functions?

  4. weinig commented on Sep 7, 2026

    @weinig
    ContributorAuthor

    Also, I wonder if it would be practical to use the standard mix() normalization algorithm instead of the bespoke one in https://drafts.csswg.org/css-color-hdr/#computing-dynamic-range-limit.

    It's a bit weird that this one mix function normalizes nested mix() functions into a single non-nested mix() function for computed value. That seems like something all mix() functions should do, or none of them.

  5. svgeesus commented on Sep 8, 2026

    @svgeesus
    Collaborator

    @ccameron both these suggestions seem reasonable to me, what do you think?

    @weinig the bespoke, multi-input normalization algorithm by @ccameron-chromium predates both the Values 5 mix normalization algorithm and the color-mix() multi-color upgrades by @tabatkins .

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

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