Re: [csswg-drafts] [css-color-5] Behavior of `none` in relative color syntax (#10151)

I think the original issue is still present.

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

> The channel keywords return a `<number>`; if they were originally specified as a <percentage> or an `<angle>`, that `<percentage>` is resolved to a `<number>` and the `<angle>` is resolved to a `<number>` of degrees (which is the canonical unit) in the range `[0, 360]`.

This implies that `none` is eagerly converted to a `<number>` and the only way to do that in the current specification is to change it to `0`, as `none` is not a `<number>`.

I think this is just an oversight and changing the paragraph to this would be sufficient: > The channel keywords return a `<number>` or `none`; if they were originally specified as a <percentage> or an `<angle>`, that `<percentage>` is resolved to a `<number>` and the `<angle>` is resolved to a `<number>` of degrees (which is the canonical unit) in the range `[0, 360]`.

-----

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

Same section, but only after all the examples :

> However, if calculations are done on missing values, `none` is treated as `0`.

Regardless of if this still reflects the current intentions of everyone here, it isn't ideal that this placed after all the examples.

Placing it after "The channel keywords return a `<number>`; ..." might be better?

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


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

Received on Thursday, 30 May 2024 18:44:02 UTC