Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant