From 993174463185e79b89cccb61dc180fe007f49541 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 21 Nov 2024 17:40:06 +0100 Subject: Body scope: Limit paragraph width --- src/scopes/_body.scss | 1 + src/scopes/_body.vars.scss | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/scopes/_body.scss b/src/scopes/_body.scss index 164e87f..4d413e3 100644 --- a/src/scopes/_body.scss +++ b/src/scopes/_body.scss @@ -13,6 +13,7 @@ font-size: props.get(vars.$font-size); p { + max-inline-size: props.get(vars.$paragraph--max-inline-size); margin-block-start: props.get(vars.$paragraph--margin-bs); } diff --git a/src/scopes/_body.vars.scss b/src/scopes/_body.vars.scss index dfaec77..79556fa 100644 --- a/src/scopes/_body.vars.scss +++ b/src/scopes/_body.vars.scss @@ -1,6 +1,9 @@ @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; -$paragraph--margin-bs: props.def(--s-body--paragraph--margin-bs, props.get(core.$size--300)) !default; -$img--max-block-size: props.def(--s-body--img--max-block-size, calc(100vh - props.get(core.$size--2400))) !default; +@use '../layouts/container.vars' as container; + +$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; +$paragraph--max-inline-size: props.def(--s-body--paragraph--max-inline-size, props.get(container.$fixed)) !default; +$img--max-block-size: props.def(--s-body--img--max-block-size, calc(100vh - props.get(core.$size--2400))) !default; -- cgit v1.2.3-70-g09d2