Skip to content

[css-color-hdr] Clarification on the grammar / spec text for dynamic-range-limit-mix() #11672

Closed

Description

@weinig

CSS Color HDR specifies the grammar for dynamic-range-limit-mix() is:

dynamic-range-limit-mix() = dynamic-range-limit-mix( [ <ident> && <percentage [0,100]> ]#)

(https://drafts.csswg.org/css-color-hdr/#dynamic-range-limit-mix)

The examples however make it seems like the actual grammar should be something more like:

dynamic-range-limit-mix() = dynamic-range-limit-mix( [ <'dynamic-range-limit'> && <percentage [0,100]> ]#)

Perhaps with a more specific value multiplier than #? I don't see any examples in the spec or tests that less than two, so maybe #{2,}?

The spec text also seems incorrect. It currently states:

This function takes two dynamic-range-limit values, converts them internally to a value in stops above media white, and alters the display to the result of mixing them by the specified amount. The actual calculated result is not exposed.

The examples all show using three, so at least the "two" there should be updated.

cc (@svgeesus, @ccameron-chromium)

Activity

  1. added
    css-2024The 2024 snapshot
    and removed
    css-2024The 2024 snapshot
    on Feb 7, 2025
  2. css-meeting-bot commented on Feb 12, 2025

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-color-hdr] Clarification on the grammar / spec text for `dynamic-range-limit-mix()` .

    The full IRC log of that discussion <joshtumath> weinig: so it's just a clarification. whether the mix() function should take other mix() functions as the input?
    <ccameron> q+
    <joshtumath> ... and the other ?: could only 1 value in it make sense or should min be 2
    <astearns> zakim, open queue
    <Zakim> ok, astearns, the speaker queue is open
    <joshtumath> ccameron: could have mix of mix. it seemed simplier to allow you to mix one value with itself, and have fewer rules
    <joshtumath> weinig: it was more the grammar, maybe a typo. I can do a PR
    <joshtumath> ChrisL: would be good
  3. self-assigned this
    on Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions