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

Fix JS API legacy SassColor.change #2368

Merged
merged 3 commits into from
Sep 28, 2024
Merged

Conversation

ntkme
Copy link
Contributor

@ntkme ntkme commented Sep 25, 2024

Changing a non-rgb legacy color's red channel works with a deprecation warning, but changing its green or blue channel fails:

> SassColor({ hue: 1, saturation: 1, lightness: 1 }).change({ red: 1 })
DEPRECATION WARNING: Changing a channel not in this color's space without explicitly specifying the `space` option is deprecated.
More info: https://sass-lang.com/d/color-4-api

hsl(179.9665650506, 43.2680443077%, 0.691245098%)

> SassColor({ hue: 1, saturation: 1, lightness: 1 }).change({ green: 1 })
Uncaught Error: `green` is not a valid channel in `hsl`.

@ntkme ntkme marked this pull request as ready for review September 25, 2024 23:14
@nex3 nex3 self-requested a review September 27, 2024 23:34
@nex3 nex3 merged commit f84e867 into sass:main Sep 28, 2024
38 checks passed
@ntkme ntkme deleted the fix-legacy-color-change branch September 28, 2024 01:00
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.

2 participants