Skip to content

Commit

Permalink
fix: use math.div()
Browse files Browse the repository at this point in the history
  • Loading branch information
Limon Monte committed Jun 27, 2021
1 parent 4b92716 commit a4a2e1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
15 changes: 7 additions & 8 deletions bootstrap-4/bootstrap-4.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use 'sass:math';

@import '~sweetalert2/src/variables';

// Function
Expand Down Expand Up @@ -438,7 +439,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: math.div($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); /* stylelint-disable-line */
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand All @@ -453,7 +454,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: math.div($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); /* stylelint-disable-line */
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 @@ -508,7 +509,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: math.div($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); /* stylelint-disable-line */
left: -($bootstrap-custom-control-gutter + $bootstrap-custom-control-indicator-size);
width: $bootstrap-custom-control-indicator-size;
height: $bootstrap-custom-control-indicator-size;
Expand All @@ -522,7 +523,7 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
content: '';
display: block;
position: absolute;
top: math.div($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); /* stylelint-disable-line */
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 @@ -566,7 +567,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: math.div($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); /* stylelint-disable-line */
transition: $bootstrap-custom-forms-transition;
border: $bootstrap-custom-range-thumb-border;
border-radius: $bootstrap-custom-range-thumb-border-radius;
Expand Down Expand Up @@ -638,7 +639,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: math.div($bootstrap-custom-range-thumb-height ,2);
border-width: math.div($bootstrap-custom-range-thumb-height, 2); /* stylelint-disable-line */
border-color: transparent;
background-color: transparent;
box-shadow: $bootstrap-custom-range-track-box-shadow;
Expand Down Expand Up @@ -702,5 +703,3 @@ $swal2-toast-buttons-font-size: $bootstrap-toast-font-size;
border-radius: $bootstrap-toast-border-radius;
background-color: $bootstrap-toast-background-color;
}

//
8 changes: 5 additions & 3 deletions material-ui/material-ui.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:math';

@import '~sweetalert2/src/variables';

// Theme variables
Expand Down Expand Up @@ -181,7 +183,7 @@ $checkbox-left-px: -2;
}

&::after {
transform: translate($checkbox-left-px *2px, ($checkbox-size-px/6) * 1px);
transform: translate($checkbox-left-px *2px, math.div($checkbox-size-px, 6) * 1px);
border-left: 0;
border-color: $material-ui-blue;
}
Expand Down Expand Up @@ -237,7 +239,7 @@ $checkbox-left-px: -2;
width: 10px;
height: -$checkbox-left-px * 2px;
float: left;
transform: translate(($checkbox-size-px/6) * 1px, -$checkbox-left-px *2px) rotate(-45deg);
transform: translate(math.div($checkbox-size-px, 6) * 1px, -$checkbox-left-px * 2px) rotate(-45deg); /* stylelint-disable-line */
border: solid 2px transparent;
border-top: 0;
border-right: 0;
Expand All @@ -264,7 +266,7 @@ $checkbox-left-px: -2;
@mixin slider-thumb {
width: $material-ui-slider-thumb-size;
height: $material-ui-slider-thumb-size;
margin-top: - 1 * ($material-ui-slider-thumb-size / 2) + 1;
margin-top: - 1 * math.div($material-ui-slider-thumb-size, 2) + 1; /* stylelint-disable-line */
border: 0;
border-radius: 50%;
background: $material-ui-blue;
Expand Down

0 comments on commit a4a2e1d

Please sign in to comment.