summaryrefslogtreecommitdiffstats
path: root/src/scopes
diff options
context:
space:
mode:
Diffstat (limited to 'src/scopes')
-rw-r--r--src/scopes/_body.scss37
-rw-r--r--src/scopes/_body.vars.scss11
-rw-r--r--src/scopes/_code.vars.scss4
-rw-r--r--src/scopes/_figures.scss21
-rw-r--r--src/scopes/_implicit.scss21
-rw-r--r--src/scopes/_implicit.vars.scss2
-rw-r--r--src/scopes/_links.vars.scss2
7 files changed, 79 insertions, 19 deletions
diff --git a/src/scopes/_body.scss b/src/scopes/_body.scss
index 6742a2a..6d32212 100644
--- a/src/scopes/_body.scss
+++ b/src/scopes/_body.scss
@@ -11,34 +11,49 @@
11 11
12 @include bem.scope('body') { 12 @include bem.scope('body') {
13 font-size: props.get(vars.$font-size); 13 font-size: props.get(vars.$font-size);
14 line-height: props.get(vars.$line-height);
14 15
15 p { 16 strong {
17 color: props.get(vars.$strong--text-color);
18 }
19
20 p,
21 ul,
22 ol {
23 max-inline-size: props.get(vars.$paragraph--max-inline-size);
16 margin-block-start: props.get(vars.$paragraph--margin-bs); 24 margin-block-start: props.get(vars.$paragraph--margin-bs);
17 } 25 }
18 26
27 ul,
28 ol {
29 box-sizing: border-box;
30 }
31
19 img { 32 img {
20 display: block; 33 display: block;
21 inline-size: auto; 34 inline-size: auto;
22 max-inline-size: 100%; 35 max-inline-size: 100%;
23 block-size: auto; 36 block-size: auto;
24 max-block-size: props.get(vars.$img--max-block-size); 37 max-block-size: props.get(vars.$img--max-block-size);
25 margin-block: props.get(vars.$block--margin-b); 38 margin-block-start: props.get(vars.$paragraph--margin-bs);
26 } 39 }
27 40
28 figure { 41 figure {
29 margin-block: props.get(vars.$block--margin-b); 42 margin-block-start: props.get(vars.$paragraph--margin-bs);
30 43
31 img { 44 img {
32 margin-block: 0; 45 margin-block: 0;
33 } 46 }
34 } 47 }
35 48
36 ul, 49 hr {
37 ol, 50 margin-block: calc(2 * props.get(vars.$paragraph--margin-bs));
51 }
52
38 table, 53 table,
39 pre, 54 pre,
40 blockquote { 55 blockquote {
41 margin-block: props.get(vars.$block--margin-b); 56 margin-block-start: props.get(vars.$paragraph--margin-bs);
42 } 57 }
43 } 58 }
44} 59}
diff --git a/src/scopes/_body.vars.scss b/src/scopes/_body.vars.scss
index 98f23bd..1de2cfd 100644
--- a/src/scopes/_body.vars.scss
+++ b/src/scopes/_body.vars.scss
@@ -1,9 +1,12 @@
1@use 'iro-sass/src/props'; 1@use 'iro-sass/src/props';
2@use '../core.vars' as core; 2@use '../core.vars' as core;
3 3
4$font-size: props.def(--s-body--font-size, props.get(core.$font-size--150)) !default; 4@use '../layouts/container.vars' as container;
5 5
6$paragraph--margin-bs: props.def(--s-body--paragraph--margin-bs, props.get(core.$size--300)) !default; 6$font-size: props.def(--s-body--font-size, props.get(core.$font-size--150)) !default;
7$block--margin-b: props.def(--s-body--block--margin-b, calc(2 * props.get($paragraph--margin-bs))) !default; 7$line-height: props.def(--s-body--line-height, calc(props.get(core.$font--standard--line-height) + .1)) !default;
8$paragraph--margin-bs: props.def(--s-body--paragraph--margin-bs, props.get(core.$size--300)) !default;
9$paragraph--max-inline-size: props.def(--s-body--paragraph--max-inline-size, props.get(container.$fixed)) !default;
10$img--max-block-size: props.def(--s-body--img--max-block-size, none) !default;
8 11
9$img--max-block-size: props.def(--s-body--img--max-block-size, calc(100vh - props.get(core.$size--2400))) !default; 12$strong--text-color: props.def(--s-body--strong--text-color, props.get(core.$theme, --heading), 'color') !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))
11$block--margin-bs: props.def(--s-code--block--margin-bs, props.get(implicit.$paragraph--margin-bs)) !default; 11$block--margin-bs: props.def(--s-code--block--margin-bs, props.get(implicit.$paragraph--margin-bs)) !default;
12$block--rounding: props.def(--s-code--block--rounding, props.get(core.$rounding)) !default; 12$block--rounding: props.def(--s-code--block--rounding, props.get(core.$rounding)) !default;
13 13
14$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --red, --1200), 'color') !default; 14$inline--fg: props.def(--s-code--inline--fg, props.get(core.$theme, --heading), 'color') !default;
15$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --red, --200), 'color') !default; 15$inline--bg: props.def(--s-code--inline--bg, props.get(core.$theme, --base, --200), 'color') !default;
16 16
17$block--fg: props.def(--s-code--block--fg, props.get(core.$theme, --text), 'color') !default; 17$block--fg: props.def(--s-code--block--fg, props.get(core.$theme, --text), 'color') !default;
18$block--bg: props.def(--s-code--block--bg, props.get(core.$theme, --base, --50), 'color') !default; 18$block--bg: props.def(--s-code--block--bg, props.get(core.$theme, --base, --50), 'color') !default;
diff --git a/src/scopes/_figures.scss b/src/scopes/_figures.scss
new file mode 100644
index 0000000..981a8b6
--- /dev/null
+++ b/src/scopes/_figures.scss
@@ -0,0 +1,21 @@
1@use 'sass:meta';
2@use 'iro-sass/src/bem';
3@use 'iro-sass/src/props';
4@use '../objects/figure.vars' as figure;
5
6@mixin styles {
7 @include bem.scope('figures') {
8 figcaption {
9 padding-block: props.get(figure.$pad-b);
10 font-size: props.get(figure.$font-size);
11 color: props.get(figure.$text-color);
12 border-block-end: props.get(figure.$border-width) solid props.get(figure.$border-color);
13
14 &::before {
15 display: block;
16 margin-block: -100em 100em;
17 content: '';
18 }
19 }
20 }
21}
diff --git a/src/scopes/_implicit.scss b/src/scopes/_implicit.scss
index 020e311..78f06be 100644
--- a/src/scopes/_implicit.scss
+++ b/src/scopes/_implicit.scss
@@ -1,5 +1,7 @@
1@use 'sass:map';
1@use 'sass:math'; 2@use 'sass:math';
2@use 'sass:meta'; 3@use 'sass:meta';
4@use 'sass:string';
3@use 'iro-sass/src/bem'; 5@use 'iro-sass/src/bem';
4@use 'iro-sass/src/props'; 6@use 'iro-sass/src/props';
5@use '../props' as *; 7@use '../props' as *;
@@ -155,5 +157,24 @@
155 padding: 0; 157 padding: 0;
156 margin: 0; 158 margin: 0;
157 } 159 }
160
161 @each $theme in map.keys(props.get(core.$transparent-colors)) {
162 .t-static-#{string.slice($theme, 3)} {
163 color: props.get(core.$transparent-colors, $theme, --800);
164
165 h1,
166 h2,
167 h3,
168 h4,
169 h5,
170 h6 {
171 color: props.get(core.$transparent-colors, $theme, --900);
172 }
173
174 hr {
175 color: props.get(core.$transparent-colors, $theme, --400);
176 }
177 }
178 }
158 } 179 }
159} 180}
diff --git a/src/scopes/_implicit.vars.scss b/src/scopes/_implicit.vars.scss
index e809ac3..388f0af 100644
--- a/src/scopes/_implicit.vars.scss
+++ b/src/scopes/_implicit.vars.scss
@@ -23,4 +23,4 @@ $heading--font-weight: props.def(--s-implicit--heading--font-weight, bold)
23$heading--font-size: props.def(--s-implicit--heading--font-size, props.get(core.$font-size--100)); 23$heading--font-size: props.def(--s-implicit--heading--font-size, props.get(core.$font-size--100));
24$heading--feature-settings: props.def(--s-implicit--heading--feature-settings, props.get(core.$font--standard--feature-settings)) !default; 24$heading--feature-settings: props.def(--s-implicit--heading--feature-settings, props.get(core.$font--standard--feature-settings)) !default;
25 25
26$heading--color: props.def(--s-implicit--heading--color, props.get(core.$theme, --heading), 'color'); 26$heading--color: props.def(--s-implicit--heading--color, props.get(core.$theme, --heading), 'color') !default;
diff --git a/src/scopes/_links.vars.scss b/src/scopes/_links.vars.scss
index 91a73ab..b9bf4d1 100644
--- a/src/scopes/_links.vars.scss
+++ b/src/scopes/_links.vars.scss
@@ -31,7 +31,7 @@ $static-themes: props.def(--s-links, (), 'color');
31 31
32 $static-themes: props.merge($static-themes, ( 32 $static-themes: props.merge($static-themes, (
33 $link-theme: ( 33 $link-theme: (
34 --text-color: props.get(core.$transparent-colors, $theme, --800), 34 --text-color: currentColor,
35 --underline-color: props.get(core.$transparent-colors, $theme, --500), 35 --underline-color: props.get(core.$transparent-colors, $theme, --500),
36 36
37 --hover: ( 37 --hover: (