diff options
author | Volpeon <git@volpeon.ink> | 2023-10-20 11:56:14 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-10-20 11:56:14 +0200 |
commit | a7abe85626b1c37c6227ffa8a01ebcd968c5a6bc (patch) | |
tree | b21ae57bff75f8e3d5346f12575e1f7b9a458d1f | |
parent | Revert bubble group to grid (diff) | |
download | iro-design-a7abe85626b1c37c6227ffa8a01ebcd968c5a6bc.tar.gz iro-design-a7abe85626b1c37c6227ffa8a01ebcd968c5a6bc.tar.bz2 iro-design-a7abe85626b1c37c6227ffa8a01ebcd968c5a6bc.zip |
Add red divider
-rw-r--r-- | src/objects/_divider.scss | 19 | ||||
-rw-r--r-- | tpl/objects/divider.pug | 7 | ||||
-rw-r--r-- | tpl/views/divider.pug | 5 |
3 files changed, 28 insertions, 3 deletions
diff --git a/src/objects/_divider.scss b/src/objects/_divider.scss index 9764ddb..943ab5f 100644 --- a/src/objects/_divider.scss +++ b/src/objects/_divider.scss | |||
@@ -35,6 +35,10 @@ | |||
35 | --bg: fn.global-color(--obj), | 35 | --bg: fn.global-color(--obj), |
36 | --label: fn.global-color(--fg-hi2), | 36 | --label: fn.global-color(--fg-hi2), |
37 | ), | 37 | ), |
38 | --red: ( | ||
39 | --bg: fn.global-color(--red --solid --bg), | ||
40 | --label: fn.global-color(--red --solid --obj), | ||
41 | ), | ||
38 | ), | 42 | ), |
39 | ), 'colors'); | 43 | ), 'colors'); |
40 | 44 | ||
@@ -64,6 +68,10 @@ | |||
64 | background-color: fn.color(--faint --bg); | 68 | background-color: fn.color(--faint --bg); |
65 | } | 69 | } |
66 | 70 | ||
71 | @include iro.bem-modifier('red') { | ||
72 | background-color: fn.color(--red --bg); | ||
73 | } | ||
74 | |||
67 | @include iro.bem-modifier('labelled') { | 75 | @include iro.bem-modifier('labelled') { |
68 | display: flex; | 76 | display: flex; |
69 | flex-direction: row; | 77 | flex-direction: row; |
@@ -126,6 +134,17 @@ | |||
126 | font-weight: 500; | 134 | font-weight: 500; |
127 | } | 135 | } |
128 | } | 136 | } |
137 | |||
138 | @include iro.bem-modifier('red') { | ||
139 | &::before, | ||
140 | &::after { | ||
141 | background-color: fn.color(--red --bg); | ||
142 | } | ||
143 | |||
144 | @include iro.bem-elem('label') { | ||
145 | color: fn.color(--red --label); | ||
146 | } | ||
147 | } | ||
129 | } | 148 | } |
130 | } | 149 | } |
131 | } | 150 | } |
diff --git a/tpl/objects/divider.pug b/tpl/objects/divider.pug index 094df07..46425cd 100644 --- a/tpl/objects/divider.pug +++ b/tpl/objects/divider.pug | |||
@@ -1,9 +1,10 @@ | |||
1 | mixin divider(level) | 1 | mixin divider(level) |
2 | - | 2 | - |
3 | let classes = { | 3 | let classes = { |
4 | 'o-divider': true, | 4 | 'o-divider': true, |
5 | 'o-divider--labelled': !!block, | 5 | 'o-divider--labelled': !!block, |
6 | ['o-divider--' + level]: true | 6 | ['o-divider--' + level]: true, |
7 | ['o-divider--' + attributes.color]: !!attributes.color | ||
7 | } | 8 | } |
8 | 9 | ||
9 | div(class=classes)&attributes(attributes) | 10 | div(class=classes)&attributes(attributes) |
diff --git a/tpl/views/divider.pug b/tpl/views/divider.pug index 8c3ec0c..af142cf 100644 --- a/tpl/views/divider.pug +++ b/tpl/views/divider.pug | |||
@@ -19,3 +19,8 @@ mixin view-divider | |||
19 | +divider('strong')= 'Strong' | 19 | +divider('strong')= 'Strong' |
20 | +divider('medium')= 'Medium' | 20 | +divider('medium')= 'Medium' |
21 | +divider('faint')= 'Faint' | 21 | +divider('faint')= 'Faint' |
22 | |||
23 | .c-box | ||
24 | +divider('strong')(color='red')= 'Strong' | ||
25 | +divider('medium')(color='red')= 'Medium' | ||
26 | +divider('faint')(color='red')= 'Faint' | ||