Re: [csswg-drafts] [css-values-4][css-color] Addition of `<color>` is way underspecified. (#8576)

My intuition is that we should treat adding colors as the result of composing the new color on top of the old. This would allow effects such as:

```css
@keyframes shade {
  0% { background: rgba(0, 0, 0, 0);
  100% { background: rgba(0, 0, 0, 0.2);
}
.selected {
  animation: shade 500ms infinite alternate add;
}
```

Which would darken whatever the element's background was. You could similarly do a lighten effect - but this is technically possible with the current behavior where we add components whereas darkening is not. I realize darkening could also be done with a filter but there may be reasons for wanting it just on the background color.

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


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

Received on Wednesday, 31 May 2023 16:55:32 UTC