Skip to content

Conversation

Ambient-Impact
Copy link

@Ambient-Impact Ambient-Impact commented Nov 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant