Re: [css-houdini-drafts] [css-typed-om] CSSColorValue section needs WG review (#1039)

> This entire section was committed in Dec 2020 under an "editorial" commit message.

Ahahaha, that was clearly a mistake; the commit message refers to the part of the commit *aside* from Color. I must have had it in my buffer when I worked on a different issue.

> It may have been by accident, but it has since stayed in the spec and never got the WG review that such a substantive edit entails. 

I definitely welcome review, but I'll note that this is relatively direct translation of CSS syntax into Typed OM, similar to Transform or math work; this should be a pretty uncontroversial addition in its current form. I don't think I needed to seek special review for adding the CSSMathMin/CSSMathMax/CSSMathClamp functions a bit ago, for example, since they didn't raise any interesting questions.

> It is now being cited by a Canvas proposal and is being promoted by the editor as a Color model for the Web, something on which there is a significant lack of consensus.

The fact that there's some side controversy about whether or not the Web needs an additional Color class beyond what this API can offer is, well, a side issue. Nothing I've put into the spec has any relevance to that discussion; like I said, it's so far a straightforward translation of CSS into Typed OM, with just a few editorial decisions about value representation in a few bits (which aren't relevant to the Color-class topic).

Regarding the Canvas proposal, as I've said twice in the [relevant issue thread](https://github.com/whatwg/html/pull/6609), the question there is about better *inputs* to the canvas color attributes. Right now they accept only strings of CSS text. Accepting a Typed OM color object as input as well is a straightforward and reasonable thing to do, regardless of whatever else we might do with a Color class on the web; I don't see any possible way this could be controversial or even particularly require seeking special consensus from the CSSWG. If/when such a Color class is accepted, it'll be an obvious input as well.

If we were talking about *output*, this would be a more difficult question; whether to have it output a TypedOM value or wait for the Color class is a valid and reasonable question that we should definitely discuss. But that's not the topic at hand.

---------

> We need to decide:
> a) Is this the API shape we want for an API representing CSS syntax?
> b) What is the scope of this? Is it in scope to use it as a generic color manipulation object for the Web Platform, or should that be a separate API?

For (a) I think I did a pretty straightforward translation, tho feedback is always welcome. Y'all's feedback has already brought some nice changes, thanks for that.

For (b), that's an interesting question to discuss, but as I've repeatedly noted, it is *not* urgent in any way. Nothing is hinging on the results of this discussion.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1039#issuecomment-841416144 using your GitHub account


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

Received on Friday, 14 May 2021 18:12:42 UTC