postcss-easing-gradients
postcss-easing-gradients copied to clipboard
Option to start or stop at different locations
Sometimes I need to start a gradient at a point past 0% or stop it before 100%. Would it be possible to add support for this?
For example, a gradient such as:
linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 25%, rgba(0, 0, 0, 0) 100%)
I just ran in to this issue on another project; I'd still love to see this in a future update – @larsenwork have you had a chance to consider this feature?
To adjust the starting point, the formula seems to be $location * (1 - ($start_point / 100)) + $start_point
for each stop between 0% and 100% (excluding 0% and 100%)