startbootstrap-sb-admin-2 icon indicating copy to clipboard operation
startbootstrap-sb-admin-2 copied to clipboard

'Slash as Division' breaking change in Sass compiler

Open stephenyeargin opened this issue 3 years ago • 1 comments

Howdy! 👋

My compile process recently began throwing deprecation notices in the .scss files that are part of this package. Looks like this may only affect folks using the latest versions of the Dart compiler, but that seems to be a fairly prevalent one.

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

Example:

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

Recommendation: math.div($spacer, 2)

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

    ╷
302 │ $headings-margin-bottom:      $spacer / 2 !default;
    │                               ^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 302:31  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

[...]

Suggested way forward:

  1. Use new math.div() and list.join()/list.append() to clear deprecation warnings
  2. Release as new major version with a minimum requirement of Dart 1.33.0 or higher
  3. Formally drop support for LibSass and Ruby Sass (both deprecated)
Full compiler output
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($spacer, 2)

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

    ╷
302 │ $headings-margin-bottom:      $spacer / 2 !default;
    │                               ^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 302:31  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

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

Recommendation: math.div($input-padding-y, 2)

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

    ╷
498 │ $input-height-inner-quarter:            add($input-line-height * .25em, $input-padding-y / 2) !default;
    │                                                                         ^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 498:73  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

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

Recommendation: math.div($custom-control-indicator-size, 2)

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

    ╷
568 │ $custom-switch-indicator-border-radius:         $custom-control-indicator-size / 2 !default;
    │                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 568:49  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

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

Recommendation: math.div($spacer, 2)

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

    ╷
713 │ $nav-divider-margin-y:              $spacer / 2 !default;
    │                                     ^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 713:37  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

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

Recommendation: math.div($spacer, 2)

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

    ╷
718 │ $navbar-padding-y:                  $spacer / 2 !default;
    │                                     ^^^^^^^^^^^
    ╵
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/_variables.scss 718:37  @import
    node_modules/startbootstrap-sb-admin-2/vendor/bootstrap/scss/bootstrap.scss 9:9      @import
    node_modules/startbootstrap-sb-admin-2/scss/sb-admin-2.scss 5:9                      root stylesheet

WARNING: 67 repetitive deprecation warnings omitted.

stephenyeargin avatar May 29 '21 01:05 stephenyeargin

This problem is knowed, the origin of this issue comes from Bootstrap 5 and it fixed with 5.0.2 (2 days ago). But it must also fixed in current version of sb-admin.

https://github.com/twbs/bootstrap/releases/tag/v5.0.2

innovaweb-dev avatar Jun 24 '21 15:06 innovaweb-dev