diff options
Diffstat (limited to 'src/layouts/_button-group.scss')
-rw-r--r-- | src/layouts/_button-group.scss | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/layouts/_button-group.scss b/src/layouts/_button-group.scss index c51ae7e..b0a3c8e 100644 --- a/src/layouts/_button-group.scss +++ b/src/layouts/_button-group.scss | |||
@@ -5,13 +5,46 @@ | |||
5 | 5 | ||
6 | @forward 'button-group.vars'; | 6 | @forward 'button-group.vars'; |
7 | @use 'button-group.vars' as vars; | 7 | @use 'button-group.vars' as vars; |
8 | @use '../objects/action-button.vars' as action-button; | ||
8 | 9 | ||
9 | @mixin styles { | 10 | @mixin styles { |
10 | @include materialize-at-root(meta.module-variables('vars')); | 11 | @include materialize-at-root(meta.module-variables('vars')); |
11 | 12 | ||
12 | @include bem.layout('button-group') { | 13 | @include bem.layout('button-group') { |
13 | display: flex; | 14 | display: inline-flex; |
14 | flex-wrap: wrap; | 15 | flex-wrap: wrap; |
15 | gap: props.get(vars.$spacing); | 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('align-block') { | ||
25 | margin-inline: calc(-1 * props.get(action-button.$pad-i) - props.get(action-button.$border-width)); | ||
26 | |||
27 | @include bem.modifier('pill') { | ||
28 | margin-inline: calc(-1 * props.get(action-button.$pad-i-pill) - props.get(action-button.$border-width)); | ||
29 | } | ||
30 | |||
31 | @include bem.modifier('icon') { | ||
32 | margin-inline: calc(-1 * props.get(action-button.$pad-b) - props.get(action-button.$border-width) - .5em * (props.get(action-button.$line-height) - 1)); | ||
33 | } | ||
34 | |||
35 | @each $mod, $pad-i, $pad-i-label, $pad-i-pill, $pad-b, $font-size in action-button.$fixed-sizes { | ||
36 | @include bem.modifier('action-#{$mod}') { | ||
37 | margin-inline: calc(-1 * props.get($pad-i) - props.get(action-button.$border-width)); | ||
38 | |||
39 | @include bem.modifier('pill') { | ||
40 | margin-inline: calc(-1 * props.get($pad-i-pill) - props.get(action-button.$border-width)); | ||
41 | } | ||
42 | |||
43 | @include bem.modifier('icon') { | ||
44 | margin-inline: calc(-1 * props.get($pad-b) - props.get(action-button.$border-width) - .5em * (props.get(action-button.$line-height) - 1)); | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | } | ||
16 | } | 49 | } |
17 | } | 50 | } |