- From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
- Date: Sat, 26 Aug 2023 22:35:36 +0000
- To: public-css-archive@w3.org
I believe, the main advantage of option 1 besides reusing existing syntax is that it allows mixing smooth gradients and stripes. This is not possible with the other options. Given the example from the original post: ```css background-image: linear-gradient(45deg, black, stripes(red, yellow, lime, blue) 100px, white); ``` This resembles a gradient using current syntax of: ```css background-image: linear-gradient(45deg, black, red calc(50% - 50px), red calc(50% - 25px), yellow calc(50% - 25px), yellow 50%, lime 50%, lime, lime calc(50% + 25px), blue calc(50% + 25px), blue calc(50% + 50px), white); ``` So, it gets rid of all the complicated calculations required now. And for anyone wondering how that looks like, here's the result: ![Linear gradient made up of smooth gradients and stripes](https://github.com/w3c/csswg-drafts/assets/958943/02734a03-c653-4641-9acb-7f56f1277000) Also, option 1 and 2 are non-exclusive. So we may go with 2 first to cover the stripes-only use cases and discuss the mixed-gradient-and-stripes case separately. Sebastian -- GitHub Notification of comment by SebastianZ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7244#issuecomment-1694514557 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 26 August 2023 22:35:39 UTC