mirror of
https://github.com/adulau/brouilleursdeblanc.git
synced 2024-11-07 12:06:26 +00:00
aadb22ffcf
- Add Bourbon and Neat
13 lines
370 B
SCSS
13 lines
370 B
SCSS
// Convert pixels to ems
|
|
// eg. for a relational value of 12px write em(12) when the parent is 16px
|
|
// if the parent is another value say 24px write em(12, 24)
|
|
|
|
@function em($pxval, $base: $em-base) {
|
|
@if not unitless($pxval) {
|
|
$pxval: strip-units($pxval);
|
|
}
|
|
@if not unitless($base) {
|
|
$base: strip-units($base);
|
|
}
|
|
@return ($pxval / $base) * 1em;
|
|
}
|