Browse Source

Refactor SCSS files to replace divide function with calc (#2150)

Paweł Kuna 6 months ago
parent
commit
bd3d959cea

+ 5 - 0
.changeset/gorgeous-mugs-admire.md

@@ -0,0 +1,5 @@
+---
+"@tabler/core": patch
+---
+
+Refactor SCSS files to replace divide function with calc

+ 1 - 1
core/scss/ui/_badges.scss

@@ -5,7 +5,7 @@
   overflow: hidden;
   user-select: none;
   border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) transparent;
-  min-width: ($badge-padding-y * 2 ) + (divide($badge-font-size, 100%) * 1em);
+  min-width: 1.25rem;
   font-weight: $headings-font-weight;
   letter-spacing: .04em;
   vertical-align: bottom;

+ 2 - 2
core/scss/ui/_calendars.scss

@@ -28,8 +28,8 @@
 }
 
 .calendar-date {
-  flex: 0 0 divide(100%, 7);
-  max-width: divide(100%, 7);
+  flex: 0 0 calc(100% / 7);
+  max-width: calc(100% / 7);
   padding: .2rem;
   text-align: center;
   border: 0;

+ 1 - 1
core/scss/utils/_opacity.scss

@@ -2,6 +2,6 @@
 
 @for $i from 0 through 20 {
   .opacity-#{$i * 5} {
-    opacity: divide($i * 5, 100) !important;
+    opacity: calc(#{$i * 5} / 100) !important;
   }
 }