diff options
author | Volpeon <git@volpeon.ink> | 2024-10-25 14:45:21 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-10-25 14:45:21 +0200 |
commit | 87d0d687d48b5939a441b893ef0bf6d41353982d (patch) | |
tree | 9cb7c1ed4393fefd85996814c55c17fd7d5c85bc /src/layouts/_split-view.scss | |
parent | Add split view layout (diff) | |
download | iro-design-87d0d687d48b5939a441b893ef0bf6d41353982d.tar.gz iro-design-87d0d687d48b5939a441b893ef0bf6d41353982d.tar.bz2 iro-design-87d0d687d48b5939a441b893ef0bf6d41353982d.zip |
Fix
Diffstat (limited to 'src/layouts/_split-view.scss')
-rw-r--r-- | src/layouts/_split-view.scss | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/layouts/_split-view.scss b/src/layouts/_split-view.scss new file mode 100644 index 0000000..eac739f --- /dev/null +++ b/src/layouts/_split-view.scss | |||
@@ -0,0 +1,54 @@ | |||
1 | @use 'sass:meta'; | ||
2 | @use 'include-media/dist/include-media' as media; | ||
3 | @use 'iro-sass/src/bem'; | ||
4 | @use 'iro-sass/src/props'; | ||
5 | @use '../props' as *; | ||
6 | |||
7 | @forward 'split-view.vars'; | ||
8 | @use 'split-view.vars' as vars; | ||
9 | |||
10 | @include bem.layout('split-view') { | ||
11 | display: flex; | ||
12 | gap: props.get(vars.$col-gap); | ||
13 | align-items: start; | ||
14 | |||
15 | @include bem.elem('panel') { | ||
16 | flex: 1 1 auto; | ||
17 | inline-size: 100%; | ||
18 | min-inline-size: 0; | ||
19 | |||
20 | @include bem.modifier('side-25') { | ||
21 | flex: 0 0 auto; | ||
22 | inline-size: 25%; | ||
23 | min-inline-size: props.get(vars.$panel--side-25--min); | ||
24 | } | ||
25 | |||
26 | @include bem.modifier('sticky') { | ||
27 | position: sticky; | ||
28 | inset-block-start: props.get(vars.$panel--sticky--inset); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | @include bem.elem('content') { | ||
33 | inline-size: 100%; | ||
34 | } | ||
35 | |||
36 | @include media.media('<=md') { | ||
37 | flex-direction: column; | ||
38 | gap: props.get(vars.$row-gap); | ||
39 | align-items: stretch; | ||
40 | |||
41 | @include bem.elem('panel') { | ||
42 | flex: 1 1 auto; | ||
43 | |||
44 | @include bem.modifier('side-25') { | ||
45 | inline-size: auto; | ||
46 | min-inline-size: 0; | ||
47 | } | ||
48 | |||
49 | @include bem.modifier('sticky') { | ||
50 | position: static; | ||
51 | } | ||
52 | } | ||
53 | } | ||
54 | } | ||