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

Replace deprecated darken() and lighten() sass functions #30

Closed
dkniffin opened this issue Jan 6, 2025 · 3 comments · Fixed by #32
Closed

Replace deprecated darken() and lighten() sass functions #30

dkniffin opened this issue Jan 6, 2025 · 3 comments · Fixed by #32
Assignees

Comments

@dkniffin
Copy link
Contributor

dkniffin commented Jan 6, 2025

I have upgraded my app to use dartsass, and I started getting these deprecation warnings:

css             | Deprecation Warning: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
css             | Use color.adjust instead.
css             |
css             | More info and automated migrator: https://sass-lang.com/d/import
css             |
css             |    ╷
css             | 10 │ $simple-switch-disable-color: lighten($simple-switch_color, 30%) !default;
css             |    │                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
css             |    ╵
css             |     a-simple-switch/src/sass/SimpleSwitch.scss 10:31                 @import
css             |
css             | Deprecation Warning: lighten() is deprecated. Suggestions:
css             |
css             | color.scale($color, $lightness: 47.6635514019%)
css             | color.adjust($color, $lightness: 30%)
css             |
css             | More info: https://sass-lang.com/d/color-functions
css             |
css             |    ╷
css             | 10 │ $simple-switch-disable-color: lighten($simple-switch_color, 30%) !default;
css             |    │                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
css             |    ╵
css             |     a-simple-switch/src/sass/SimpleSwitch.scss 10:31                 @import

There's a similar one for darken.

@ava-cassiopeia
Copy link
Owner

Ah thanks for the heads up! I think I'll just use base CSS for this one instead of SASS — I've really been enjoying color-mix() in the SASS I write for my job, and it's pretty well supported.

@ava-cassiopeia
Copy link
Owner

Okay the fix for this should be available in v0.9.2, please let me know if you have any issues and feel free to reopen if that's the case!

@dkniffin
Copy link
Contributor Author

dkniffin commented Jan 7, 2025

@ava-cassiopeia that resolved it. Thank you!

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

Successfully merging a pull request may close this issue.

2 participants