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

sass deprecation warning on _functions.scss with latest sass/gulp-sass version #37468

Closed
flyke opened this issue Nov 10, 2022 · 2 comments
Closed

Comments

@flyke
Copy link

flyke commented Nov 10, 2022

I have a project with a main .scss file which imports:

  • _variables.scss (bootstrap sass overrides for the project)
  • node_modules/bootstrap/scss

package.json contains these versions:

  • "bootstrap": "^5.2.2",
  • "gulp-sass": "^5.1.0"
  • "sass": "^1.56.1"

When my gulp file pipes the sass command to compile scss into a css file, it generates this warning:

[11:08:12] Starting 'sass-dev'...
Deprecation Warning: $weight: Passing a number without unit % (100) is deprecated.

To preserve current behavior: $weight * 1%

More info: https://sass-lang.com/d/function-units

    ╷
201 │   @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
    │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/bootstrap/scss/_functions.scss 201:11            opaque()
    node_modules/bootstrap/scss/mixins/_table-variants.scss 4:28  table-variant()
    node_modules/bootstrap/scss/_tables.scss 147:3                @import
    node_modules/bootstrap/scss/bootstrap.scss 20:9               @import
    build/scss/main.scss 13:9                                     root stylesheet

This warning is not generated with older version of gulp-sass which did not needed to include "sass" separately into the package.json file

My suggestion is to fix this in the _functions.scss file.

@julien-deramond
Copy link
Member

Closing it. Duplicate of #37424 already fixed.

@julien-deramond julien-deramond closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2022
@AmirinNS
Copy link

AmirinNS commented Nov 15, 2022

If you don't plan to update the Bootstrap, you can downgrade the sass version to 1.55.0

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

3 participants