diff options
Diffstat (limited to 'assets/css')
-rw-r--r-- | assets/css/_basics.scss | 4 | ||||
-rw-r--r-- | assets/css/_functions.scss | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss index efa0279..f2b2624 100644 --- a/assets/css/_basics.scss +++ b/assets/css/_basics.scss | |||
@@ -23,7 +23,7 @@ html { | |||
23 | background-color: prop(--colors --bg); | 23 | background-color: prop(--colors --bg); |
24 | color: prop(--colors --fg); | 24 | color: prop(--colors --fg); |
25 | font-family: $font-fam--text; | 25 | font-family: $font-fam--text; |
26 | font-size: 1em / 16px * $font-size; | 26 | font-size: px-to-em($font-size); |
27 | line-height: $line-height; | 27 | line-height: $line-height; |
28 | } | 28 | } |
29 | 29 | ||
@@ -36,7 +36,7 @@ body { | |||
36 | 36 | ||
37 | main { | 37 | main { |
38 | @include iro-responsive-env(('sm', 'md')) { | 38 | @include iro-responsive-env(('sm', 'md')) { |
39 | font-size: iro-responsive-set((1rem, 1 / 16 * 18rem)); | 39 | font-size: iro-responsive-set((1rem, iro-px-to-rem(18px))); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/assets/css/_functions.scss b/assets/css/_functions.scss index 1523772..5e2518e 100644 --- a/assets/css/_functions.scss +++ b/assets/css/_functions.scss | |||
@@ -1,5 +1,7 @@ | |||
1 | @use 'sass:math'; | ||
2 | |||
1 | @function px-to-em($s, $b: $font-size) { | 3 | @function px-to-em($s, $b: $font-size) { |
2 | @return 1 / ($b / 1px) * ($s / 1px) * 1em; | 4 | @return 1 / math.div($b, 1px) * math.div($s, 1px) * 1em; |
3 | } | 5 | } |
4 | 6 | ||
5 | @function str-repeat($s, $n) { | 7 | @function str-repeat($s, $n) { |