Browse Source

@uppy/image-editor: fix SASS deprecation warning (#3009)

Antoine du Hamel 3 years ago
parent
commit
fe0f79e8c2
1 changed files with 6 additions and 4 deletions
  1. 6 4
      packages/@uppy/image-editor/src/inputrange.scss

+ 6 - 4
packages/@uppy/image-editor/src/inputrange.scss

@@ -4,6 +4,8 @@
 // Version 1.5.2
 // MIT License
 
+@use "sass:math";
+
 $track-color: rgba(#fff, 0.2);
 $thumb-color: #fff;
 
@@ -54,7 +56,7 @@ $ie-bottom-track-color: darken($track-color, $contrast);
 [type='range'] {
   -webkit-appearance: none;
   background: transparent;
-  margin: $thumb-height / 2 0;
+  margin: math.div($thumb-height, 2) 0;
   width: $track-width;
 
   &::-moz-focus-outer {
@@ -88,7 +90,7 @@ $ie-bottom-track-color: darken($track-color, $contrast);
   &::-webkit-slider-thumb {
     @include thumb;
     -webkit-appearance: none;
-    margin-top: ((-$track-border-width * 2 + $track-height) / 2 - $thumb-height / 2);
+    margin-top: (math.div((-$track-border-width * 2 + $track-height), 2) - math.div($thumb-height, 2));
   }
 
   &::-moz-range-track {
@@ -108,7 +110,7 @@ $ie-bottom-track-color: darken($track-color, $contrast);
     @include track;
     background: transparent;
     border-color: transparent;
-    border-width: ($thumb-height / 2) 0;
+    border-width: math.div($thumb-height, 2) 0;
     color: transparent;
   }
 
@@ -128,7 +130,7 @@ $ie-bottom-track-color: darken($track-color, $contrast);
 
   &::-ms-thumb {
     @include thumb;
-    margin-top: $track-height / 4;
+    margin-top: math.div($track-height, 4);
   }
 
   &:disabled {