DEPRECATED: this package has been moved to new reference in Sass Collective monorepo
@sass-collective/rem
, use this package because the current repository is no more maintained.
Sass function & mixin to generate rem value.
npm install @sass-collective/sass-rem --save
rem($values);
rem($property, $values);
Names | Values |
---|---|
$baseline |
16 |
@use "@sass-collective/sass-rem" with (
$baseline: 16
);
@use "@sass-collective/sass-rem";
// Function
html,
body {
// Single value
font-size: sass-rem.rem(16);
// Multiple values
margin: sass-rem.rem(20 30);
}
// Mixin
html,
body {
// Single value
@include sass-rem.rem(font-size, 16);
// Multiple values
@include sass-rem.rem(margin, 20 30);
}
@import "@sass-collective/sass-rem";
// Function
html,
body {
font-size: sass-rem(16);
margin: sass-rem(20 30);
}
// Mixin
html,
body {
@include sass-rem(font-size, 16);
@include sass-rem(margin, 20 30);
}
html,
body {
font-size: 1rem;
margin: 1.25rem 1.875rem;
}