Re: [csswg-drafts] [css-color-5] Make channel values in relative color syntax optional (#10689)

My suggestion was to make use of what already exists and to make this (marginally) easier to type for CSS authors.

My thinking was that the effort to make the channel keywords optional would be a less than introducing new color related functions.

Having sane default behavior even when arguments are omitted is also often a good thing for CSS authors. (e.g. recent changes `clamp()`)

I agree that the added value of saving a few keystrokes is slim here, but I think it is balanced by the (seemingly?) low effort to make this change and how common it is to only want to adjust the opacity of a color.

I don't have a strong opinion on this, I think that `rgb(from pink / 0.3)` is kinda nice, I've often found myself only changing opacity and wanting such a simplified syntax. But I never wanted it that much that I opened an issue about it myself :)

> I just don't think having to write `r g b` in `rgb(from var(--foo) r g b / .5)` is much of an imposition.

I agree, but at the same time I also each time think: "why do I need to?"

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


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

Received on Wednesday, 7 August 2024 09:31:11 UTC