summaryrefslogtreecommitdiffstats
path: root/src/layouts/_media.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/layouts/_media.scss')
-rw-r--r--src/layouts/_media.scss40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/layouts/_media.scss b/src/layouts/_media.scss
index c42aa3e..2192db5 100644
--- a/src/layouts/_media.scss
+++ b/src/layouts/_media.scss
@@ -1,45 +1,39 @@
1@use 'iro-sass/src/index' as iro; 1@use 'sass:meta';
2@use '../functions' as fn; 2@use 'iro-sass/src/bem';
3@use 'iro-sass/src/props';
4@use '../props' as *;
3 5
4$sizes: 'gapless' 'sm' 'lg' 'xl' !default; 6@forward 'media.vars';
7@use 'media.vars' as vars;
5 8
6@include iro.props-namespace('media') { 9@mixin styles {
7 @include iro.props-store(( 10 @include materialize-at-root(meta.module-variables('vars'));
8 --dims: (
9 --gap: fn.global-dim(--size --150),
10 11
11 --gapless: 0, 12 @include bem.layout('media') {
12 --sm: fn.global-dim(--size --100),
13 --lg: fn.global-dim(--size --300),
14 --xl: fn.global-dim(--size --450),
15 )
16 ));
17
18 @include iro.bem-layout(iro.props-namespace()) {
19 display: flex; 13 display: flex;
14 gap: props.get(vars.$gap);
20 align-items: center; 15 align-items: center;
21 gap: fn.dim(--gap);
22 line-height: 1.4; 16 line-height: 1.4;
23 17
24 @each $size in $sizes { 18 @each $mod, $size in vars.$sizes {
25 @include iro.bem-modifier($size) { 19 @include bem.modifier($mod) {
26 gap: fn.dim(--#{$size}); 20 gap: props.get($size);
27 } 21 }
28 } 22 }
29 23
30 @include iro.bem-modifier('wrap') { 24 @include bem.modifier('wrap') {
31 flex-wrap: wrap; 25 flex-wrap: wrap;
32 } 26 }
33 27
34 @include iro.bem-elem('block') { 28 @include bem.elem('block') {
35 flex: 0 0 auto; 29 flex: 0 0 auto;
36 30
37 @include iro.bem-modifier('shrink', 'main') { 31 @include bem.modifier('shrink', 'main') {
38 flex-shrink: 1; 32 flex-shrink: 1;
39 min-inline-size: 0; 33 min-inline-size: 0;
40 } 34 }
41 35
42 @include iro.bem-modifier('main') { 36 @include bem.modifier('main') {
43 inline-size: 100%; 37 inline-size: 100%;
44 } 38 }
45 } 39 }