#How to use gradient with more than 2 colors?
14 messages · Page 1 of 1 (latest)
It says it accepts an object with deg, from and to. I'd like intermediate colors between from and to to simulate the easing. Is it possible?
Please read the second paragraph
Sorry, reading now
Alright, that's what I imagined
BTW, consider simulating the easing by default like in the link I provided. There's a PostCSS plugin that does it. Maybe add an option for easing.
You can install and use any postcss plugins, there are no limitations from Mantine side
I mean so we can have nicer gradients without recurring to Styles API
It's about 130 lines of code in total to simulate the easing, might be incorporated into the function that generates the gradient in Mantine. I think I'll patch it locally.
I think it's safe to assume every Mantine user would prefer the right one:
FWIW, patched and ended up adding 55 lines (taken from https://npm.im/postcss-easing-gradients) and installing https://npm.im/easing-coordinates (801B gzipped).
Hum, maybe allow to pass a custom getGradient function via theme. 🤔