postcss-easing-gradients icon indicating copy to clipboard operation
postcss-easing-gradients copied to clipboard

Added Chroma.js workaround for it not yet supporting 'deg' units:

Open Ambient-Impact opened this issue 3 years ago • 0 comments

This works around gka/chroma.js#297 by stripping the 'deg' unit in hsl()/hsla() colours, which fixes instances of this plug-in failing to parse the newer colour format. This is particularly a problem with Sass, as it tends to output to the newer format. Without this workaround, you'd get errors such as these:

Couldn't parse:
linear-gradient(to bottom, hsl(0deg, 0%, 95%), cubic-bezier(0.4, 0, 1, 1), rgba(242, 242, 242, 0))
Check the syntax to see if it's correct/supported.
Couldn't parse:
linear-gradient(to bottom, hsl(0deg, 0%, 4%), cubic-bezier(0.4, 0, 1, 1), rgba(10, 10, 10, 0))
Check the syntax to see if it's correct/supported.
Couldn't parse:
linear-gradient(to top, hsl(0deg, 0%, 95%), cubic-bezier(0.4, 0, 1, 1), rgba(242, 242, 242, 0))
Check the syntax to see if it's correct/supported.
Couldn't parse:
linear-gradient(to top, hsl(0deg, 0%, 4%), cubic-bezier(0.4, 0, 1, 1), rgba(10, 10, 10, 0))
Check the syntax to see if it's correct/supported.

Ambient-Impact avatar Nov 02 '22 23:11 Ambient-Impact