From a4a2e1d61514cbf7b70de4020af7d28ca9cbf8d8 Mon Sep 17 00:00:00 2001 From: Limon Monte Date: Sun, 27 Jun 2021 23:53:20 +0300 Subject: [PATCH] fix: use math.div() --- bootstrap-4/bootstrap-4.scss | 15 +++++++-------- material-ui/material-ui.scss | 8 +++++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bootstrap-4/bootstrap-4.scss b/bootstrap-4/bootstrap-4.scss index 2d92d0a..9ec0ebc 100644 --- a/bootstrap-4/bootstrap-4.scss +++ b/bootstrap-4/bootstrap-4.scss @@ -1,4 +1,5 @@ @use 'sass:math'; + @import '~sweetalert2/src/variables'; // Function @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; } - -// diff --git a/material-ui/material-ui.scss b/material-ui/material-ui.scss index 068de9e..fc51bb0 100644 --- a/material-ui/material-ui.scss +++ b/material-ui/material-ui.scss @@ -1,3 +1,5 @@ +@use 'sass:math'; + @import '~sweetalert2/src/variables'; // Theme variables @@ -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; } @@ -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; @@ -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;