summaryrefslogtreecommitdiffstats
path: root/src/objects/_dialog.scss
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-02-11 17:34:57 +0100
committerVolpeon <git@volpeon.ink>2022-02-11 17:34:57 +0100
commit67722515b4882458547bcbe8ac13e60ba3790a56 (patch)
tree08ffa0f345e1e0074bfbb01466c7d0b0da0edd0b /src/objects/_dialog.scss
parentUpdate (diff)
downloadiro-design-67722515b4882458547bcbe8ac13e60ba3790a56.tar.gz
iro-design-67722515b4882458547bcbe8ac13e60ba3790a56.tar.bz2
iro-design-67722515b4882458547bcbe8ac13e60ba3790a56.zip
Added backdrop and dialog
Diffstat (limited to 'src/objects/_dialog.scss')
-rw-r--r--src/objects/_dialog.scss57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss
new file mode 100644
index 0000000..453b32b
--- /dev/null
+++ b/src/objects/_dialog.scss
@@ -0,0 +1,57 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('dialog') {
5 @include iro.props-store((
6 --dims: (
7 --pad-x: iro.fn-px-to-rem(40px),
8 --pad-y: iro.fn-px-to-rem(40px),
9 --width-sm: iro.fn-px-to-rem(500px),
10 --width-md: iro.fn-px-to-rem(800px),
11 --width-lg: iro.fn-px-to-rem(1100px),
12 --rounding: 3px,
13 ),
14 ), 'dims');
15
16 @include iro.props-store((
17 --colors: (
18 --shadow: 0 .2em .5em rgba(#000, .2),
19 ),
20 ), 'colors');
21
22 @include iro.bem-object(iro.props-namespace()) {
23 max-width: fn.dim(--width-md);
24 margin: 0 auto;
25 padding: fn.dim(--pad-y) fn.dim(--pad-x);
26 overflow: hidden;
27 border-radius: fn.dim(--rounding);
28 background-color: fn.global-color(--bg);
29 box-shadow: fn.color(--shadow);
30 color: fn.global-color(--fg);
31
32 @include iro.bem-modifier('sm') {
33 max-width: fn.dim(--width-sm);
34 }
35
36 @include iro.bem-modifier('lg') {
37 max-width: fn.dim(--width-lg);
38 }
39
40 @include iro.bem-elem('header') {
41 padding-bottom: .5rem;
42 }
43
44 @include iro.bem-elem('title') {
45 margin-top: 0;
46 }
47
48 @include iro.bem-elem('body') {
49 padding-top: .5rem;
50 }
51
52 @include iro.bem-elem('footer') {
53 padding-top: fn.dim(--pad-y);
54 text-align: right;
55 }
56 }
57}