Re: [csswg-drafts] [css-color-4]: Relative Colors doesn’t work with `calc(l + 10%)` (#10571)

From `css-color-5`: https://drafts.csswg.org/css-color-5/#relative-syntax

> The [channel keywords](https://drafts.csswg.org/css-color-5/#channel-keyword) return a [`<number>`](https://drafts.csswg.org/css-values-4/#number-value); if they were originally specified as a [`<percentage>`](https://drafts.csswg.org/css-values-4/#percentage-value) or an [`<angle>`](https://drafts.csswg.org/css-values-4/#angle-value), that `<percentage>` is resolved to a `<number>` and the `<angle>` is resolved to a `<number>` of degrees (which is the [canonical unit](https://drafts.csswg.org/css-values-4/#canonical-unit)) in the range [0, 360].

So the `l` in `calc(l - 0.1)` is of type `<number>`.

From `css-values-4` : https://drafts.csswg.org/css-values-4/#mixed-percentages

> More `<type-percentage>` productions can be added in the future as needed. A `<number-percentage>` will never be added, as `<number>` and `<percentage>` can’t be combined in `calc()`.

The most recent discussion about this can be found here : https://github.com/w3c/csswg-drafts/issues/9955

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10571#issuecomment-2226853609 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 13 July 2024 10:49:17 UTC