From ea091a2a45b77201560fa2e17b8adb00956eddaa Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 26 Nov 2021 18:32:07 +0100 Subject: Update --- assets/css/_basics.scss | 4 ++-- assets/css/_functions.scss | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'assets') 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 { background-color: prop(--colors --bg); color: prop(--colors --fg); font-family: $font-fam--text; - font-size: 1em / 16px * $font-size; + font-size: px-to-em($font-size); line-height: $line-height; } @@ -36,7 +36,7 @@ body { main { @include iro-responsive-env(('sm', 'md')) { - font-size: iro-responsive-set((1rem, 1 / 16 * 18rem)); + font-size: iro-responsive-set((1rem, iro-px-to-rem(18px))); } } 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 @@ +@use 'sass:math'; + @function px-to-em($s, $b: $font-size) { - @return 1 / ($b / 1px) * ($s / 1px) * 1em; + @return 1 / math.div($b, 1px) * math.div($s, 1px) * 1em; } @function str-repeat($s, $n) { -- cgit v1.2.3-70-g09d2