You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1034 (comment), Lea points out that it's annoying to figure out what the colorspace of a color object is.
We already have precedent in Typed OM for helping with this - the math function subclasses expose their function name as a property as well, precisely to avoid this annoying hacky work.
Seems like the most straightforward fix is to move ".colorspace" to the CSSColorValue superclass, as a readonly property that's automatically set to the corresponding function name, and then make it writable on CSSColor.
(Conveniently, the CSSWG just resolved to drop the "lab" predefined color space for color(), so there's no clashes anymore. "rgb" (for rgb()) and "srgb" (for color(srgb)) will be close, but they're distinct.)