Update _units.scss

This commit is contained in:
Chris Chen 2024-04-07 09:50:56 -07:00
parent d1039a409b
commit 8961490ff8

View File

@ -5,9 +5,9 @@
// Function for converting a px based font-size to rem.
@function parseInt($n) {
@if ($n == !important) {
@return !important
@return !important;
} @else {
$rem-size: $n / 14px;
$rem-size: calc($n / 14px);
@return #{$rem-size}rem;
}
}
@ -18,8 +18,7 @@
@each $value in $values {
@if index((0, 0px), $value) or $value == auto {
$rem: append($rem, $value);
}
@else {
} @else {
$rem: append($rem, parseInt($value));
}
}