Skip to content

SASS deprecation warnings despite upgrading to BS 5.3.5 #41367

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

Closed
3 tasks done
VBproDev opened this issue Apr 12, 2025 · 3 comments
Closed
3 tasks done

SASS deprecation warnings despite upgrading to BS 5.3.5 #41367

VBproDev opened this issue Apr 12, 2025 · 3 comments

Comments

@VBproDev
Copy link

Prerequisites

Describe the issue

Normally importing Bootstrap in SASS-

@import "bootstrap/scss/bootstrap.scss";
@import "bootstrap/scss/bootstrap-utilities.scss";

leads to 200+ deprecation warnings upon build (I have pasted a small sample, hundreds more spam the terminal)-

Deprecation Warning [color-functions]: red() is deprecated. Suggestion:

color.channel($color, "red", $space: rgb)

More info: https://sass-lang.com/d/color-functions

    ╷
185 │     "r": red($color),
    │          ^^^^^^^^^^^
    ╵
    ..\..\..\bootstrap\scss\_functions.scss 185:10  luminance()
    ..\..\..\bootstrap\scss\_functions.scss 174:8   contrast-ratio()
    ..\..\..\bootstrap\scss\_functions.scss 159:22  color-contrast()
    ..\..\..\bootstrap\scss\_variables.scss 846:42  @import
    ..\..\..\bootstrap\scss\bootstrap.scss 8:9      @import
    ..\..\..\..\src\styles\custom.scss 1:9          root stylesheet

Deprecation Warning [color-functions]: green() is deprecated. Suggestion:

color.channel($color, "green", $space: rgb)

More info: https://sass-lang.com/d/color-functions

    ╷
186 │     "g": green($color),
    │          ^^^^^^^^^^^^^
    ╵
    ..\..\..\bootstrap\scss\_functions.scss 186:10  luminance()
    ..\..\..\bootstrap\scss\_functions.scss 174:8   contrast-ratio()
    ..\..\..\bootstrap\scss\_functions.scss 159:22  color-contrast()
    ..\..\..\bootstrap\scss\_variables.scss 846:42  @import
    ..\..\..\bootstrap\scss\bootstrap.scss 8:9      @import
    ..\..\..\..\src\styles\custom.scss 1:9          root stylesheet

Deprecation Warning [color-functions]: blue() is deprecated. Suggestion:

color.channel($color, "blue", $space: rgb)

More info: https://sass-lang.com/d/color-functions

    ╷
187 │     "b": blue($color)
    │          ^^^^^^^^^^^^
    ╵
    ..\..\..\bootstrap\scss\_functions.scss 187:10  luminance()
    ..\..\..\bootstrap\scss\_functions.scss 174:8   contrast-ratio()
    ..\..\..\bootstrap\scss\_functions.scss 159:22  color-contrast()
    ..\..\..\bootstrap\scss\_variables.scss 846:42  @import
    ..\..\..\bootstrap\scss\bootstrap.scss 8:9      @import
    ..\..\..\..\src\styles\custom.scss 1:9          root stylesheet

Deprecation Warning [color-functions]: red() is deprecated. Suggestion:

color.channel($color, "red", $space: rgb)

More info: https://sass-lang.com/d/color-functions

   ╷
37 │   @return red($value), green($value), blue($value);
   │           ^^^^^^^^^^^
   ╵
    ..\..\..\bootstrap\scss\_functions.scss 37:11   to-rgb()
    ..\..\..\bootstrap\scss\_variables.scss 846:31  @import
    ..\..\..\bootstrap\scss\bootstrap.scss 8:9      @import
    ..\..\..\..\src\styles\custom.scss 1:9          root stylesheet

Deprecation Warning [color-functions]: green() is deprecated. Suggestion:

color.channel($color, "green", $space: rgb)

More info: https://sass-lang.com/d/color-functions

   ╷
37 │   @return red($value), green($value), blue($value);
   │                        ^^^^^^^^^^^^^
   ╵
    ..\..\..\bootstrap\scss\_functions.scss 37:24   to-rgb()
    ..\..\..\bootstrap\scss\_variables.scss 846:31  @import
    ..\..\..\bootstrap\scss\bootstrap.scss 8:9      @import
    ..\..\..\..\src\styles\custom.scss 1:9          root stylesheet

Warning: 246 repetitive deprecation warnings omitted.
Run in verbose mode to see all warnings.

Reduced test cases

I'm aware that this issue has been discussed in great detail in this #40621 . Earlier a 'hack' was recommended for this issue, it was to degrade SASS to 1.77.6. Then, when 5.3.5 and 5.3.4 were released, it was said that the new versions have a permanent fix for this problem. However, as I illustrated above, this issue isn't resolved by bumping Bootstrap to 5.3.4/5 (for context, I use the latest sass-embedded package at 1.86.3). I had raised this issue in the same thread, it received some support, but no answers were given. So I'm raising a new issue to draw attention that the fix of the SASS deprecation (bumping Bootstrap) doesn't work

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

v5.3.5

@julien-deramond
Copy link
Member

Hello, I understand it can be difficult to follow all the changes—we'e actively working to improve that, but as mentioned in the blog post:

Fixed a Sass 1.77.7 deprecation for nested rules

This means that only the deprecation warnings related to Sass 1.77.7 have been addressed so far.

You mentioned using the latest sass-embedded package version 1.86.3, which is newer than the version we targeted in our recent fix. So the issues you're encountering are related to #40849 and #40962 which are still open.

I'll create a GitHub Discussion soon to provide a clearer overview and make it easier to find this information.

In the meantime, I'm closing this issue as a duplicate. Thanks for your understanding!

@VBproDev
Copy link
Author

@julien-deramond Thanks, I totally understand. Can you link the PR fixing this issue and can I contribute in it in my free time?

@julien-deramond
Copy link
Member

It's probably going to be a mix between #41112 and things to extract from #41236. We'll re-start something whenever we'll be ready to switch to this issue following this roadmap: https://github.com/orgs/twbs/discussions/41370. You'll be able at this moment to jump in to help us double-check what's been done and challenge the solution :)

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

No branches or pull requests

2 participants