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 sass 1.79 deprecation warnings #7273

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Sep 19, 2024

What this PR does

This bumps sass to version 1.79 and fixes
the deprecation warning:

DEPRECATION WARNING: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 21.7021276596%)
color.adjust($color, $lightness: 10%)
More info: https://sass-lang.com/d/color-functions

12 │ @return lighten($base-color, 10%);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^

lib/Sass/common/_variables.scss 12:11 get-hover-color()
lib/Sass/common/_buttons.scss 69:17 root stylesheet

and:

DEPRECATION WARNING: darken() is deprecated. Suggestions: color.scale($color, $lightness: -27.7551020408%)
color.adjust($color, $lightness: -8%)
More info: https://sass-lang.com/d/color-functions

172 │ $chart-darker: darken($dark, 8%);
│ ^^^^^^^^^^^^^^^^^

lib/Sass/common/_variables.scss 172:16 @import
lib/Sass/common/_buttons.scss 1:9 root stylesheet

Test me

Check that darkened and lightened colors appear as they should.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@pjonsson
Copy link
Contributor Author

There is also an annoying:

DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

that would presumably be resolved by bumping sass-loader to v16, but that requires TerriaJS/TerriaMap to drop the support for the EOL'd Node 16.

@ljowen
Copy link
Contributor

ljowen commented Sep 30, 2024

Thanks for this @pjonsson could you please add a line to CHANGES.md

@pjonsson pjonsson force-pushed the fix-sass-deprecation-warnings branch 2 times, most recently from b87281c to 4732e68 Compare September 30, 2024 07:23
This bumps sass to version 1.79 and fixes
the deprecation warning:

DEPRECATION WARNING: lighten() is deprecated. Suggestions:
color.scale($color, $lightness: 21.7021276596%)
color.adjust($color, $lightness: 10%)
More info: https://sass-lang.com/d/color-functions
   ╷
12 │   @return lighten($base-color, 10%);
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    lib/Sass/common/_variables.scss 12:11  get-hover-color()
    lib/Sass/common/_buttons.scss 69:17    root stylesheet

and:

DEPRECATION WARNING: darken() is deprecated. Suggestions:
color.scale($color, $lightness: -27.7551020408%)
color.adjust($color, $lightness: -8%)
More info: https://sass-lang.com/d/color-functions
    ╷
172 │ $chart-darker: darken($dark, 8%);
    │                ^^^^^^^^^^^^^^^^^
    ╵
    lib/Sass/common/_variables.scss 172:16  @import
    lib/Sass/common/_buttons.scss 1:9       root stylesheet
@pjonsson
Copy link
Contributor Author

@ljowen fixed.

@ljowen ljowen merged commit 53a6824 into TerriaJS:main Oct 1, 2024
6 checks passed
@pjonsson pjonsson deleted the fix-sass-deprecation-warnings branch October 1, 2024 07:16
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