Re: [csswg-drafts] [css-images] Mesh gradient / Freeform gradient (#7648)

+1. I think this syntax works, covers a lot of mesh gradient use cases, and is much easier to implement than mesh gradients. 

Notably, it enables this use case which is currently impossible (any color pickers on the Web fake it by overlaying semi-transparent gradients or use WebGL):

<img width="646" alt="image" src="https://github.com/w3c/csswg-drafts/assets/175836/e4f83329-cc68-4c6f-9f8f-8310e7c59cda">

Based on recent resolutions and syntax, I’d adjust the grammar to:

```
freeform-gradient( [<color-interpolation-method>]?, [ <color> <bg-position> ]#{1,} )
```

Changes:
- We want `<color-interpolation-method>` on every gradient
- We [recently resolved](https://github.com/w3c/csswg-drafts/issues/10092#issuecomment-2145860054) to allow gradients with 1 color stop and no positions
- Using `<bg-position>` also allows keywords, with established rules about defaulting.

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


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

Received on Monday, 10 June 2024 12:37:12 UTC