summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-11-22 21:09:50 +0100
committerVolpeon <git@volpeon.ink>2024-11-22 21:09:50 +0100
commit19dc20390327021b683ba6e8169588eec3dd8e72 (patch)
treeb106ed701fd3636ec9170b4399e2f22647c4093e /src
parentAdd u-sr-only (diff)
downloadiro-design-19dc20390327021b683ba6e8169588eec3dd8e72.tar.gz
iro-design-19dc20390327021b683ba6e8169588eec3dd8e72.tar.bz2
iro-design-19dc20390327021b683ba6e8169588eec3dd8e72.zip
Add figures scope
Diffstat (limited to 'src')
-rw-r--r--src/_iro-design.scss1
-rw-r--r--src/scopes/_figures.scss19
-rw-r--r--src/scopes/_figures.vars.scss10
3 files changed, 30 insertions, 0 deletions
diff --git a/src/_iro-design.scss b/src/_iro-design.scss
index 5ed32e9..204e889 100644
--- a/src/_iro-design.scss
+++ b/src/_iro-design.scss
@@ -37,6 +37,7 @@ $breakpoints: (
37@forward 'scopes/body' as s-body--*; 37@forward 'scopes/body' as s-body--*;
38@forward 'scopes/blockquotes' as s-blockquotes--*; 38@forward 'scopes/blockquotes' as s-blockquotes--*;
39@forward 'scopes/code' as s-code--*; 39@forward 'scopes/code' as s-code--*;
40@forward 'scopes/figures' as s-figures--*;
40@forward 'scopes/headings' as s-headings--*; 41@forward 'scopes/headings' as s-headings--*;
41@forward 'scopes/links' as s-links--*; 42@forward 'scopes/links' as s-links--*;
42@forward 'scopes/lists' as s-lists--*; 43@forward 'scopes/lists' as s-lists--*;
diff --git a/src/scopes/_figures.scss b/src/scopes/_figures.scss
new file mode 100644
index 0000000..4da3c80
--- /dev/null
+++ b/src/scopes/_figures.scss
@@ -0,0 +1,19 @@
1@use 'sass:meta';
2@use 'iro-sass/src/bem';
3@use 'iro-sass/src/props';
4@use '../props' as *;
5
6@forward 'figures.vars';
7@use 'figures.vars' as vars;
8
9@mixin styles {
10 @include materialize-at-root(meta.module-variables('vars'));
11
12 @include bem.scope('figures') {
13 figcaption {
14 padding-block: props.get(vars.$pad-b);
15 font-size: props.get(vars.$font-size);
16 border-block-end: props.get(vars.$border-width) solid props.get(vars.$border-color);
17 }
18 }
19}
diff --git a/src/scopes/_figures.vars.scss b/src/scopes/_figures.vars.scss
new file mode 100644
index 0000000..5547c33
--- /dev/null
+++ b/src/scopes/_figures.vars.scss
@@ -0,0 +1,10 @@
1@use 'iro-sass/src/props';
2@use '../core.vars' as core;
3@use './implicit.vars' as implicit;
4
5$pad-b: props.def(--s-figures--pad-b, props.get(core.$size--200)) !default;
6$border-width: props.def(--s-figures--border-width, props.get(core.$border-width--thick)) !default;
7$font-size: props.def(--s-figures--font-size, props.get(core.$font-size--100)) !default;
8
9$text-color: props.def(--s-figures--text-color, props.get(core.$theme, --text-mute), 'color') !default;
10$border-color: props.def(--s-figures--border-color, props.get(core.$theme, --border), 'color') !default;