[css-houdini-drafts] CSSColorValue.colorSpace restricts naming of future color functions and color() keywords (#1070)

tabatkins has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== CSSColorValue.colorSpace restricts naming of future color functions and color() keywords ==
CSSColorValue exposes a `.colorSpace` attribute and a `.to(colorSpace)` method, which use the same set of strings. For `color()` functions, the corresponding string is the color space keyword; for the other color functions, the corresponding string is the function name.

These two sets of names aren't guaranteed to be distinct! *Currently*, there's no overlap, but there was in a previous revision to the spec when `color(lab ...)` was allowed.

@svgeesus and @LeaVerou, do you think restricting these two sets to be non-overlapping in the future is reasonable? Or do you think it's plausible we may want to have such an overlap? If the latter, I think the easiest solution for this is to use parens at the end of the string for the function names, so `CSSRGB.colorSpace` would return `"rgb()"`, you'd call `c.to("rgb()")`, etc. Thoughts?

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1070 using your GitHub account


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

Received on Tuesday, 19 April 2022 21:46:05 UTC