scss-framework/function/_rem.scss
Sven Ullmann 58842c665e init
2025-07-19 23:58:24 +02:00

15 lines
No EOL
242 B
SCSS

@function rem($pixel, $basis: 16) {
$negative: false;
@if ($pixel < 0) {
$negative: true;
$pixel: calc($pixel * -1);
}
$rem: calc($pixel / $basis);
@if ($negative) {
$rem: calc($rem * -1);
}
@return $rem + 0rem;
}