summaryrefslogtreecommitdiffstats
path: root/src/layouts/_hlist.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/layouts/_hlist.scss')
-rw-r--r--src/layouts/_hlist.scss50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/layouts/_hlist.scss b/src/layouts/_hlist.scss
new file mode 100644
index 0000000..5075541
--- /dev/null
+++ b/src/layouts/_hlist.scss
@@ -0,0 +1,50 @@
1@use 'sass:meta';
2@use 'iro-sass/src/bem';
3@use 'iro-sass/src/props';
4@use '../props' as *;
5
6@forward 'hlist.vars';
7@use 'hlist.vars' as vars;
8@use '../objects/button.vars' as button;
9
10@mixin styles {
11 @include materialize-at-root(meta.module-variables('vars'));
12
13 @include bem.layout('hlist') {
14 display: inline-flex;
15 flex-wrap: wrap;
16 gap: props.get(vars.$gap);
17
18 @each $mod, $size in vars.$sizes {
19 @include bem.modifier($mod) {
20 gap: props.get($size);
21 }
22 }
23
24 @include bem.modifier('buttons') {
25 margin-inline: calc(-1 * props.get(button.$pad-i) - props.get(button.$border-width));
26
27 @include bem.modifier('pill') {
28 margin-inline: calc(-1 * props.get(button.$pad-i-pill) - props.get(button.$border-width));
29 }
30
31 @include bem.modifier('icon') {
32 margin-inline: calc(-1 * props.get(button.$pad-b) - props.get(button.$border-width) - .5em * (props.get(button.$line-height) - 1));
33 }
34
35 @each $mod, $pad-i, $pad-i-label, $pad-i-pill, $pad-b, $font-size in button.$fixed-sizes {
36 @include bem.modifier('action-#{$mod}') {
37 margin-inline: calc(-1 * props.get($pad-i) - props.get(button.$border-width));
38
39 @include bem.modifier('pill') {
40 margin-inline: calc(-1 * props.get($pad-i-pill) - props.get(button.$border-width));
41 }
42
43 @include bem.modifier('icon') {
44 margin-inline: calc(-1 * props.get($pad-b) - props.get(button.$border-width) - .5em * (props.get(button.$line-height) - 1));
45 }
46 }
47 }
48 }
49 }
50}