Style setup
This commit is contained in:
18
src/style/tools/_functions.scss
Normal file
18
src/style/tools/_functions.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
/* PX to REM
|
||||
========================================================================== */
|
||||
@function rem ($target, $context: $base-font-size) {
|
||||
@if $target == 0 { @return 0 }
|
||||
$size: $target / $context;
|
||||
@return round($size * 1000) / 1000 + rem;
|
||||
}
|
||||
|
||||
|
||||
/* Headings
|
||||
========================================================================== */
|
||||
@function headings ($from: 1, $to: 6) {
|
||||
@if $from == $to {
|
||||
@return "h#{$from}";
|
||||
} @else {
|
||||
@return "h#{$from}," + headings($from + 1, $to);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user