From b7389232dfaeed97468230ef1f804858db45107e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 21 Nov 2024 16:05:21 +0100 Subject: Body scope --- src/scopes/_body.scss | 16 ++++++++-------- src/scopes/_body.vars.scss | 7 ++----- src/scopes/_code.vars.scss | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) (limited to 'src/scopes') diff --git a/src/scopes/_body.scss b/src/scopes/_body.scss index 6742a2a..164e87f 100644 --- a/src/scopes/_body.scss +++ b/src/scopes/_body.scss @@ -17,16 +17,16 @@ } img { - display: block; - inline-size: auto; - max-inline-size: 100%; - block-size: auto; - max-block-size: props.get(vars.$img--max-block-size); - margin-block: props.get(vars.$block--margin-b); + display: block; + inline-size: auto; + max-inline-size: 100%; + block-size: auto; + max-block-size: props.get(vars.$img--max-block-size); + margin-block-start: props.get(vars.$paragraph--margin-bs); } figure { - margin-block: props.get(vars.$block--margin-b); + margin-block-start: props.get(vars.$paragraph--margin-bs); img { margin-block: 0; @@ -38,7 +38,7 @@ table, pre, blockquote { - margin-block: props.get(vars.$block--margin-b); + margin-block-start: props.get(vars.$paragraph--margin-bs); } } } diff --git a/src/scopes/_body.vars.scss b/src/scopes/_body.vars.scss index 98f23bd..dfaec77 100644 --- a/src/scopes/_body.vars.scss +++ b/src/scopes/_body.vars.scss @@ -1,9 +1,6 @@ @use 'iro-sass/src/props'; @use '../core.vars' as core; -$font-size: props.def(--s-body--font-size, props.get(core.$font-size--150)) !default; - +$font-size: props.def(--s-body--font-size, props.get(core.$font-size--150)) !default; $paragraph--margin-bs: props.def(--s-body--paragraph--margin-bs, props.get(core.$size--300)) !default; -$block--margin-b: props.def(--s-body--block--margin-b, calc(2 * props.get($paragraph--margin-bs))) !default; - -$img--max-block-size: props.def(--s-body--img--max-block-size, calc(100vh - props.get(core.$size--2400))) !default; +$img--max-block-size: props.def(--s-body--img--max-block-size, calc(100vh - props.get(core.$size--2400))) !default; diff --git a/src/scopes/_code.vars.scss b/src/scopes/_code.vars.scss index e06971b..8a040c2 100644 --- a/src/scopes/_code.vars.scss +++ b/src/scopes/_code.vars.scss @@ -11,8 +11,8 @@ $block--pad-b: props.def(--s-code--block--pad-b, props.get(core.$size--85)) $block--margin-bs: props.def(--s-code--block--margin-bs, props.get(implicit.$paragraph--margin-bs)) !default; $block--rounding: props.def(--s-code--block--rounding, props.get(core.$rounding)) !default; -$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --red, --1200), 'color') !default; -$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --red, --200), 'color') !default; +$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --heading), 'color') !default; +$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --base, --200), 'color') !default; $block--fg: props.def(--s-code--block--fg, props.get(core.$theme, --text), 'color') !default; $block--bg: props.def(--s-code--block--bg, props.get(core.$theme, --base, --50), 'color') !default; -- cgit v1.2.3-70-g09d2