summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2025-07-22 22:16:51 +0200
committerVolpeon <git@volpeon.ink>2025-07-22 22:16:51 +0200
commitc188e483a373c6627693a27820fba9e9238cad53 (patch)
tree5938fffd6fc6aa2336632d176a61ae35a91de77e
parentFix (diff)
downloadiro-design-c188e483a373c6627693a27820fba9e9238cad53.tar.gz
iro-design-c188e483a373c6627693a27820fba9e9238cad53.tar.bz2
iro-design-c188e483a373c6627693a27820fba9e9238cad53.zip
Fixed divider
-rw-r--r--src/objects/_divider.scss35
-rw-r--r--src/objects/_divider.vars.scss20
-rw-r--r--tpl/views/divider.pug13
3 files changed, 61 insertions, 7 deletions
diff --git a/src/objects/_divider.scss b/src/objects/_divider.scss
index 4ed8092..9b58e77 100644
--- a/src/objects/_divider.scss
+++ b/src/objects/_divider.scss
@@ -91,6 +91,26 @@
91 } 91 }
92 } 92 }
93 93
94 @include bem.modifier('quiet') {
95 font-size: props.get(vars.$quiet--label-font-size);
96 font-weight: 500;
97 color: props.get(vars.$quiet--label-color);
98
99 &::before,
100 &::after {
101 block-size: props.get(vars.$quiet--border-width);
102 background-color: props.get(vars.$quiet--bg-color);
103 }
104
105 @include bem.modifier('vertical') {
106 background-color: props.get(vars.$vertical--quiet--bg-color);
107 }
108
109 @include bem.modifier('dot') {
110 background-color: props.get(vars.$dot--quiet--bg-color);
111 }
112 }
113
94 @include bem.modifier('faint') { 114 @include bem.modifier('faint') {
95 font-size: props.get(vars.$faint--label-font-size); 115 font-size: props.get(vars.$faint--label-font-size);
96 font-weight: 500; 116 font-weight: 500;
@@ -103,11 +123,11 @@
103 } 123 }
104 124
105 @include bem.modifier('vertical') { 125 @include bem.modifier('vertical') {
106 background-color: props.get(vars.$vertical--faint--bg-color); 126 background-color: props.get(vars.$vertical--quiet--bg-color);
107 } 127 }
108 128
109 @include bem.modifier('dot') { 129 @include bem.modifier('dot') {
110 background-color: props.get(vars.$dot--faint--bg-color); 130 background-color: props.get(vars.$dot--quiet--bg-color);
111 } 131 }
112 } 132 }
113 133
@@ -157,6 +177,17 @@
157 } 177 }
158 } 178 }
159 179
180 @include bem.modifier('quiet') {
181 &::before,
182 &::after {
183 background-color: props.get(vars.$static-themes, $theme, --quiet, --bg);
184 }
185
186 @include bem.elem('label') {
187 color: props.get(vars.$static-themes, $theme, --quiet, --label);
188 }
189 }
190
160 @include bem.modifier('faint') { 191 @include bem.modifier('faint') {
161 &::before, 192 &::before,
162 &::after { 193 &::after {
diff --git a/src/objects/_divider.vars.scss b/src/objects/_divider.vars.scss
index 5cd68c1..5a5639b 100644
--- a/src/objects/_divider.vars.scss
+++ b/src/objects/_divider.vars.scss
@@ -13,6 +13,9 @@ $strong--label-font-size: props.def(--o-divider--strong--label-font-size, props.
13$medium--border-width: props.def(--o-divider--medium--border-width, props.get(core.$border-width--medium)) !default; 13$medium--border-width: props.def(--o-divider--medium--border-width, props.get(core.$border-width--medium)) !default;
14$medium--label-font-size: props.def(--o-divider--medium--label-font-size, props.get(core.$font-size--75)) !default; 14$medium--label-font-size: props.def(--o-divider--medium--label-font-size, props.get(core.$font-size--75)) !default;
15 15
16$quiet--border-width: props.def(--o-divider--quiet--border-width, props.get(core.$border-width--thin)) !default;
17$quiet--label-font-size: props.def(--o-divider--quiet--label-font-size, props.get(core.$font-size--50)) !default;
18
16$faint--border-width: props.def(--o-divider--faint--border-width, props.get(core.$border-width--thin)) !default; 19$faint--border-width: props.def(--o-divider--faint--border-width, props.get(core.$border-width--thin)) !default;
17$faint--label-font-size: props.def(--o-divider--faint--label-font-size, props.get(core.$font-size--50)) !default; 20$faint--label-font-size: props.def(--o-divider--faint--label-font-size, props.get(core.$font-size--50)) !default;
18 21
@@ -22,12 +25,15 @@ $strong--label-color: props.def(--o-divider--strong--label-color, props.get(core
22$medium--bg-color: props.def(--o-divider--medium--bg-color, props.get(core.$theme, --border), 'color') !default; 25$medium--bg-color: props.def(--o-divider--medium--bg-color, props.get(core.$theme, --border), 'color') !default;
23$medium--label-color: props.def(--o-divider--medium--label-color, props.get(core.$theme, --text-mute), 'color') !default; 26$medium--label-color: props.def(--o-divider--medium--label-color, props.get(core.$theme, --text-mute), 'color') !default;
24 27
25$faint--bg-color: props.def(--o-divider--faint--bg-color, props.get(core.$theme, --border), 'color') !default; 28$quiet--bg-color: props.def(--o-divider--quiet--bg-color, props.get(core.$theme, --border), 'color') !default;
26$faint--label-color: props.def(--o-divider--faint--label-color, props.get(core.$theme, --text-mute-more), 'color') !default; 29$quiet--label-color: props.def(--o-divider--quiet--label-color, props.get(core.$theme, --text-mute-more), 'color') !default;
30
31$faint--bg-color: props.def(--o-divider--faint--bg-color, props.get(core.$theme, --border-mute), 'color') !default;
32$faint--label-color: props.def(--o-divider--faint--label-color, props.get(core.$theme, --text-disabled), 'color') !default;
27 33
28$vertical--faint--bg-color: props.def(--o-divider--vertical--faint--bg-color, props.get(core.$theme, --border-mute), 'color') !default; 34$vertical--quiet--bg-color: props.def(--o-divider--vertical--quiet--bg-color, props.get(core.$theme, --border-mute), 'color') !default;
29 35
30$dot--faint--bg-color: props.def(--o-divider--dot--faint--bg-color, props.get(core.$theme, --border-mute), 'color') !default; 36$dot--quiet--bg-color: props.def(--o-divider--dot--quiet--bg-color, props.get(core.$theme, --border-mute), 'color') !default;
31 37
32$static-themes: props.def(--o-divider, (), 'color'); 38$static-themes: props.def(--o-divider, (), 'color');
33 39
@@ -44,10 +50,14 @@ $static-themes: props.def(--o-divider, (), 'color');
44 --bg: props.get(core.$transparent-colors, $theme, --300), 50 --bg: props.get(core.$transparent-colors, $theme, --300),
45 --label: props.get(core.$transparent-colors, $theme, --500), 51 --label: props.get(core.$transparent-colors, $theme, --500),
46 ), 52 ),
47 --faint: ( 53 --quiet: (
48 --bg: props.get(core.$transparent-colors, $theme, --300), 54 --bg: props.get(core.$transparent-colors, $theme, --300),
49 --label: props.get(core.$transparent-colors, $theme, --500), 55 --label: props.get(core.$transparent-colors, $theme, --500),
50 ), 56 ),
57 --faint: (
58 --bg: props.get(core.$transparent-colors, $theme, --200),
59 --label: props.get(core.$transparent-colors, $theme, --400),
60 ),
51 ) 61 )
52 )); 62 ));
53} 63}
diff --git a/tpl/views/divider.pug b/tpl/views/divider.pug
index ea08984..5429ab5 100644
--- a/tpl/views/divider.pug
+++ b/tpl/views/divider.pug
@@ -12,34 +12,45 @@ mixin view-divider
12 12
13 .c-box 13 .c-box
14 +div-heading('xs')= 'Heading' 14 +div-heading('xs')= 'Heading'
15 +divider('quiet')
16 p= loremIpsum
17
18 .c-box
19 +div-heading('xs')= 'Heading'
15 +divider('faint') 20 +divider('faint')
16 p= loremIpsum 21 p= loremIpsum
17 22
18 .c-box 23 .c-box
19 +divider('strong')= 'Strong' 24 +divider('strong')= 'Strong'
20 +divider('medium')= 'Medium' 25 +divider('medium')= 'Medium'
26 +divider('quiet')= 'Quiet'
21 +divider('faint')= 'Faint' 27 +divider('faint')= 'Faint'
22 +divider('strong') 28 +divider('strong')
23 +divider('medium') 29 +divider('medium')
30 +divider('quiet')
24 +divider('faint') 31 +divider('faint')
25 32
26 .c-box 33 .c-box
27 .l-media(style="height: 1em") 34 .l-media(style="height: 1em")
28 +divider('strong')(vertical=true class="l-media__block") 35 +divider('strong')(vertical=true class="l-media__block")
29 +divider('medium')(vertical=true class="l-media__block") 36 +divider('medium')(vertical=true class="l-media__block")
37 +divider('quiet')(vertical=true class="l-media__block")
30 +divider('faint')(vertical=true class="l-media__block") 38 +divider('faint')(vertical=true class="l-media__block")
31 .l-media(style="height: 1em") 39 .l-media(style="height: 1em")
32 +divider('strong')(dot=true class="l-media__block") 40 +divider('strong')(dot=true class="l-media__block")
33 +divider('medium')(dot=true class="l-media__block") 41 +divider('medium')(dot=true class="l-media__block")
42 +divider('quiet')(dot=true class="l-media__block")
34 +divider('faint')(dot=true class="l-media__block") 43 +divider('faint')(dot=true class="l-media__block")
35 44
36 each theme in ['accent', 'negative'] 45 each theme in ['accent', 'negative']
37 .c-box 46 .c-box
38 +divider('strong')(color=theme)= 'Strong' 47 +divider('strong')(color=theme)= 'Strong'
39 +divider('medium')(color=theme)= 'Medium' 48 +divider('medium')(color=theme)= 'Medium'
49 +divider('quiet')(color=theme)= 'Quiet'
40 +divider('faint')(color=theme)= 'Faint' 50 +divider('faint')(color=theme)= 'Faint'
41 +divider('strong')(color=theme) 51 +divider('strong')(color=theme)
42 +divider('medium')(color=theme) 52 +divider('medium')(color=theme)
53 +divider('quiet')(color=theme)
43 +divider('faint')(color=theme) 54 +divider('faint')(color=theme)
44 55
45 each theme in ['static-black', 'static-white'] 56 each theme in ['static-black', 'static-white']
@@ -49,7 +60,9 @@ mixin view-divider
49 .c-box(style=`background-color: var(--colors--blue-static--${bg});`) 60 .c-box(style=`background-color: var(--colors--blue-static--${bg});`)
50 +divider('strong')(color=theme)= 'Strong' 61 +divider('strong')(color=theme)= 'Strong'
51 +divider('medium')(color=theme)= 'Medium' 62 +divider('medium')(color=theme)= 'Medium'
63 +divider('quiet')(color=theme)= 'Quiet'
52 +divider('faint')(color=theme)= 'Faint' 64 +divider('faint')(color=theme)= 'Faint'
53 +divider('strong')(color=theme) 65 +divider('strong')(color=theme)
54 +divider('medium')(color=theme) 66 +divider('medium')(color=theme)
67 +divider('quiet')(color=theme)
55 +divider('faint')(color=theme) 68 +divider('faint')(color=theme)