twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.6k stars 3.53k forks source link

Bootstrap-sass v3.3.7 generates a "Using / for division is deprecated and will be removed in Dart Sass 2.0.0." warning when using laravel mix #1219

Closed realtebo closed 2 years ago

realtebo commented 2 years ago

I know v3.3.7 is a very old versione now.

But we are using it due to a long-life laravel project using a specific bought laravel admin theme.

Actually, laravel mix is using dart-sass to compile it. I don't know if it's related or not.

We have A LOT of warning (more than 30) about this

28 │   margin-bottom: ($line-height-computed / 2);
   │                   ^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules\bootstrap-sass\assets\stylesheets\bootstrap\_type.scss 28:19  @import
    node_modules\bootstrap-sass\assets\stylesheets\_bootstrap.scss 18:9        @import
    resources\assets\sass\frontend\frontend.scss 13:9                          root stylesheet

: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($line-height-computed, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
38 │   margin-top: ($line-height-computed / 2);
   │                ^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules\bootstrap-sass\assets\stylesheets\bootstrap\_type.scss 38:16  @import
    node_modules\bootstrap-sass\assets\stylesheets\_bootstrap.scss 18:9        @import
    resources\assets\sass\frontend\frontend.scss 13:9                          root stylesheet

: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($line-height-computed, 2)

I kindly ask you to replace division with math.div

See that: https://sass-lang.com/documentation/breaking-changes/slash-div

there is a tool to automate migration from / to math.div

I see that some months ago an user prepared this, but it's not ready to merge: https://github.com/twbs/bootstrap-sass/pull/1218

realtebo commented 2 years ago

I copy/paste from this link: https://github.com/twbs/bootstrap-sass/pull/1218#issuecomment-872806540

since this repo is no loger active maintains, i made a npm package use your pr, hope it is usefull https://www.npmjs.com/package/bootstrap3-sass https://github.com/kikyous/bootstrap3-sass

install: npm install bootstrap3-sass

We resolved all issues