[csswg-drafts] [css-images] symmetrical/mirrored css gradients (#7534)

jsnkuhn has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images] symmetrical/mirrored css gradients ==
There is usually an option for symmetrical gradients in images editors. We do not have this functionality in CSS gradients (https://www.w3.org/TR/css-images/).

SVG gradient `spreadMethod` already has a `reflect` option: 

> Reflect the gradient pattern start-to-end, end-to-start, start-to-end, etc. continuously until the target rectangle is filled.

https://svgwg.org/svg2-draft/pservers.html#LinearGradientElementSpreadMethodAttribute

Could allow devs the ability to write half the code and get the same result:

current:
```css
linear-gradient(transparent, red, red, transparent)
```

propsed:
```css
reflect/symmetrical/mirror?-linear-gradient(transparent, red 50%)
repeating-linear-gradient(transparent, red, reflect?)
```

Ana Tudor's example from twitter:

https://twitter.com/anatudor/status/1273657268106600449

https://codepen.io/thebabydino/pen/BajpyXV?editors=1100

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7534 using your GitHub account


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

Received on Monday, 25 July 2022 20:15:54 UTC