-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
dart-sass deprecation warning: Passing percentage units to the global abs() function is deprecated. #39028
Comments
mixins_grid.scss
the divide function need an integer instead of a percentage |
From: https://sass-lang.com/documentation/breaking-changes/ |
bootstrap.scss ADD AT THE TOP bootstrap_alert.scss bootstrap_list-group.scss bootstrap\mixins_grid.scss |
Exceptions: - @types/node to latest v18 (latest lts) - sass to 1.64.2 because twbs/bootstrap#39028 is not fixed - typescript to latest v5 (wanted v5)
I will second this:
Could you have a fix ASAP, please? Deprecation warning issued by SASS: https://sass-lang.com/d/abs-percent Motivation and contextI just don't want LOGs and warnings like these when running yarn start. |
[8:09:00 PM] Deprecation Warning: Passing percentage units to the global abs() function is deprecated. ╷
|
I have the same problem with bootstrap
|
getting the same warning |
Hi there! I have the same warning with bootstrap 4.6.2. Edit: I know that BS 4.x is deprecated and maintainance is focused on BS 5.x but I'm wondering if the fix (if any) could be backported on 4.x. Thank you! |
Otherwise it will complain about bootstrap's use of deprecated methods (see twbs/bootstrap#39028)
Is this project dead? |
@VictorQueiroz I'm not involved in this project, and I don't want to speak out for the maintainers, but I don't think so. |
I agree with you that it's just a warning but still, it's a warning and the warning says :
Since I'm not a CSS expert I don't know / can't measure the impact it will have on the app I'm maintaining : it could break something... or not 😄 That's why i'm asking to maintainers if a fix on BS 4.x could be planned. Edit: from Sass point of view it's a breaking change https://sass-lang.com/documentation/breaking-changes/ |
vite HMR is spamming my terminal with this warning can we get the PR pushed and released please |
@jdion84 You can downgrade the sass dependency in your packages.json to remove the warnings:
My PR don't fix all warnings. This topic will take time. |
It's very sad to see people complaining about an open source project, where you get everything for free, you have access to the source code, you have documentation, you can participate/contribute with a PR, and so on. |
To add @musaab-abdalla's fix to git (until a new version is released) use patch-package:
Be aware that this fix does not work under Libsass so the definitive fix for this issue will be something different. |
@rallets I agree with you mostly however, "Open source will not last long" is wrong. Linus Torvald still argues for the "Open Source" concept with coding and the sciences (not necessarily politics and other "grey" areas). We use open-source resources to create and enhance private products and services. When code is no longer maintained, if there is no better alternative, being open-source, anyone with the qualified skills can pick up the project and continue it. https://www.youtube.com/watch?v=7XTHdcmjenI |
I also encountered this issue. It's just a warning and I didn't notice any actual impact. But I'm still waiting for it to be fixed officially. Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent
╷
57 │ $dividend: abs($dividend);
│ ^^^^^^^^^^^^^^
╵
D:\blog.runphp.net\node_modules\bootstrap\scss\vendor\_rfs.scss 57:14 divide()
D:\blog.runphp.net\node_modules\bootstrap\scss\mixins\_grid.scss 59:12 row-cols()
D:\blog.runphp.net\node_modules\bootstrap\scss\mixins\_grid.scss 85:13 @content
D:\blog.runphp.net\node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5 media-breakpoint-up()
D:\blog.runphp.net\node_modules\bootstrap\scss\mixins\_grid.scss 72:5 make-grid-columns()
bootstrap\scss\_grid.scss 38:3 @import
_style.scss 47:9 @import
D:\blog.runphp.net\css\main.scss 2:9 root stylesheet
...done in 29.6915673 seconds.
Regenerating: 1 file(s) changed at 2023-09-05 11:14:29
_sass/_style.scss
Jekyll Feed: Generating feed for posts |
I using Nuxt v3.7.1 with bootstrap 5.3.1 and I fixed this error following the AvigdorB's tips: 1 - In node_modules/bootstrap/scss/vendor/_rfs.scss file, add to top:
2 - In line error, replace:
to
|
- with pin for scss because of twbs/bootstrap#39028
The file is actually |
@hashimaziz1 The fixed version of Bootstrap is 5.3.2 which is why this PR was closed. "Passing a percentage unit to the global abs() is deprecated since Dart Sass v1.65.0. It resulted in a deprecation warning when compiling Bootstrap with Dart Sass. This has been fixed internally by changing the values passed to the divide() function. The divide() function has not been fixed itself so that we can keep supporting node-sass cross-compatibility. In v6, this won't be an issue as we plan to drop support for node-sass." https://github.com/twbs/bootstrap/releases/tag/v5.3.2 |
I'm currently on 5.2.3, and it's seeming like enough things have been added to 5.3 to make it a risk updating the codebase to it. |
Hey there , i have the same problem
|
if u are with the same error just follow what the user musaab-abdalla says. |
All non-major versions are up to date, and a few major versions are upgraded as well. NOTE: sass is held back to 1.64.2, instead of updating all the way, because of twbs/bootstrap#39028. A subsequent commit to update bootstrap to 5.3.2 will upgrade this as well.
All non-major versions are up to date, and a few major versions are upgraded as well. NOTE: sass is held back to 1.64.2, instead of updating all the way, because of twbs/bootstrap#39028. A subsequent commit to update bootstrap to 5.3.2 will upgrade this as well.
This can be automated
What it does
Yarn v1 users more info
|
For those using earlier versions of Bootstrap and encountering the warning related to the To resolve this warning, I implemented a custom SCSS solution that defines an Here’s the detailed solution:
By defining the |
Prerequisites
Describe the issue
While using the latest bootstrap with dart-sass and including bootstrap via scss, the latest dart-sass is warning about a deprecation:
the stacktrace they show is:
I hope this helps. Tks for your work.
Reduced test cases
@import '../../node_modules/bootstrap/scss/functions';
@import '../../node_modules/bootstrap/scss/_variables';
@import '../../node_modules/bootstrap/scss/bootstrap';
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?
5.3.1
The text was updated successfully, but these errors were encountered: