summaryrefslogtreecommitdiffstats
path: root/src/objects/_dialog.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects/_dialog.scss')
-rw-r--r--src/objects/_dialog.scss69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss
new file mode 100644
index 0000000..e3c786d
--- /dev/null
+++ b/src/objects/_dialog.scss
@@ -0,0 +1,69 @@
1@use 'sass:meta';
2@use 'iro-sass/src/bem';
3@use 'iro-sass/src/props';
4@use '../props' as *;
5
6@forward 'dialog.vars';
7@use 'dialog.vars' as vars;
8
9@use 'backdrop.vars' as backdrop;
10@use 'divider.vars' as divider;
11
12@mixin styles {
13 @include materialize-at-root(meta.module-variables('vars'));
14
15 @include bem.object('dialog') {
16 display: none;
17 box-sizing: border-box;
18 inline-size: 100%;
19 max-inline-size: none;
20 block-size: 100%;
21 min-block-size: 0;
22 max-block-size: none;
23 padding: props.get(vars.$pad-b) props.get(vars.$pad-i);
24 margin: 0;
25 background-color: transparent;
26 border: 0;
27
28 &::backdrop {
29 background-color: props.get(backdrop.$bg-color);
30 backdrop-filter: blur(props.get(backdrop.$blur));
31 }
32
33 &[open],
34 &:popover-open {
35 display: flex;
36 flex-direction: column;
37 }
38
39 @include bem.elem('content') {
40 pointer-events: auto;
41 border-radius: props.get(vars.$rounding);
42 background-color: props.get(vars.$bg-color);
43 }
44
45 @include bem.elem('header') {
46 display: flex;
47 align-items: center;
48 padding: props.get(vars.$body--pad-i) props.get(vars.$body--pad-i) 0;
49 }
50
51 @include bem.elem('divider') {
52 margin-inline: props.get(vars.$body--pad-i);
53
54 @include bem.next-elem('body') {
55 padding-block-start: calc(.5 * props.get(vars.$body--pad-b) - props.get(divider.$margin-b));
56 }
57 }
58
59 @include bem.elem('body') {
60 padding: props.get(vars.$body--pad-b) props.get(vars.$body--pad-i);
61
62 &::before {
63 display: block;
64 margin-block: -100em 100em;
65 content: '';
66 }
67 }
68 }
69}