doc/themes/learn2-git-sync/scss/vendor/bourbon/addons/_rem.scss
tituspijean 7b447ac5ae Grav-ification
Creating the pages hierarchy for transitioning to Grav
2020-11-10 17:34:30 +01:00

33 lines
696 B
SCSS

@mixin rem($property, $size, $base: $em-base) {
@if not unitless($base) {
$base: strip-units($base);
}
$unitless_values: ();
@each $num in $size {
@if not unitless($num) {
@if unit($num) == "em" {
$num: $num * $base;
}
$num: strip-units($num);
}
$unitless_values: append($unitless_values, $num);
}
$size: $unitless_values;
$pixel_values: ();
$rem_values: ();
@each $value in $pxval {
$pixel_value: $value * 1px;
$pixel_values: append($pixel_values, $pixel_value);
$rem_value: ($value / $base) * 1rem;
$rem_values: append($rem_values, $rem_value);
}
#{$property}: $pixel_values;
#{$property}: $rem_values;
}