Skip to content

Commit

Permalink
Using math.div for division (#74)
Browse files Browse the repository at this point in the history
* Update SASS division to use math.div 

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

* add `@use 'sass:math';` in top of file
  • Loading branch information
riobahtiar authored Jun 27, 2021
1 parent 1667812 commit 4b92716
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bootstrap-4/bootstrap-4.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use 'sass:math';
@import '~sweetalert2/src/variables';

// Function
Expand Down Expand Up @@ -437,7 +438,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: ($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size) / 6;
top: math.div($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size, 6);
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand All @@ -452,7 +453,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: ($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size) / 6;
top: math.div($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size, 6);
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand Down Expand Up @@ -507,7 +508,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: ($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size) / 2;
top: math.div($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size, 2);
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand All @@ -521,7 +522,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: ($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size) / 2;
top: math.div($swal2-input-font-size * $bootstrap-input-line-height - $bootstrap-custom-control-indicator-size, 2);
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand Down Expand Up @@ -565,7 +566,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
&::-webkit-slider-thumb {
width: $bootstrap-custom-range-thumb-width;
height: $bootstrap-custom-range-thumb-height;
margin-top: ($bootstrap-custom-range-track-height - $bootstrap-custom-range-thumb-height) / 2;
margin-top: math.div($bootstrap-custom-range-track-height - $bootstrap-custom-range-thumb-height, 2);
transition: $bootstrap-custom-forms-transition;
border: $bootstrap-custom-range-thumb-border;
border-radius: $bootstrap-custom-range-thumb-border-radius;
Expand Down Expand Up @@ -637,7 +638,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
&::-ms-track {
width: $bootstrap-custom-range-track-width;
height: $bootstrap-custom-range-track-height;
border-width: $bootstrap-custom-range-thumb-height / 2;
border-width: math.div($bootstrap-custom-range-thumb-height ,2);
border-color: transparent;
background-color: transparent;
box-shadow: $bootstrap-custom-range-track-box-shadow;
Expand Down

0 comments on commit 4b92716

Please sign in to comment.