Skip to content

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

@realtebo

Description

@realtebo

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: #1218

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions