From 3524f1bac11c8a9d1640bfeac5ceb063ff96d623 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 6 Feb 2022 17:17:33 +0100 Subject: Improved variable structure --- src/_general.scss | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/_general.scss') diff --git a/src/_general.scss b/src/_general.scss index e03d0b3..1e7c180 100644 --- a/src/_general.scss +++ b/src/_general.scss @@ -1,5 +1,6 @@ @use 'iro-sass/src/index' as iro; @use 'mixins/typography'; +@use 'functions' as fn; @use 'vars'; html, @@ -8,12 +9,12 @@ body { } body { - @include typography.set-font(vars.$font--main, (size: iro.props-get(--dims --font-size --md))); + @include typography.set-font(vars.$font--main, (size: fn.dim(--font-size --md))); margin: 0; padding: 0; - background-color: iro.props-get(--colors --bg); - color: iro.props-get(--colors --fg); + background-color: fn.color(--bg); + color: fn.color(--fg); } h1, @@ -22,13 +23,13 @@ h3, h4, h5, h6 { - @include typography.set-font(vars.$font--main, (size: iro.props-get(--dims --font-size --md), weight: 400)); + @include typography.set-font(vars.$font--main, (size: fn.dim(--font-size --md), weight: 400)); margin: 0; } p { - margin-top: iro.props-get(--dims --paragraph --margin-top); + margin-top: fn.dim(--paragraph --margin-top); margin-bottom: 0; &:empty { @@ -38,8 +39,8 @@ p { ul, ol { - margin: iro.props-get(--dims --paragraph --margin-top) 0 0; - padding-left: iro.props-get(--dims --list --indent); + margin: fn.dim(--paragraph --margin-top) 0 0; + padding-left: fn.dim(--list --indent); } :focus { @@ -77,12 +78,12 @@ textarea { } ::selection { - background: iro.props-get(--colors --selection --bg); - color: iro.props-get(--colors --selection --fg); + background: fn.color(--selection --bg); + color: fn.color(--selection --fg); } img { &::selection { - background: iro.props-get(--colors --selection --bg-img); + background: fn.color(--selection --bg-img); } } -- cgit v1.2.3-54-g00ecf