summaryrefslogtreecommitdiffstats
path: root/assets/css/_functions.scss
blob: 107cba7898288ec5adaa92c865a3efb61e55adc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@use 'sass:math';

@function px-to-em($s, $b: 16px) {
    @return math.div(1, math.div($b, 1px)) * math.div($s, 1px) * 1em;
}

@function str-repeat($s, $n) {
    $r: '';
    @while $n > 0 {
        $r: $r + $s;
        $n: $n - 1;
    }
    @return $r;
}