diff options
Diffstat (limited to 'src/scss/components/_modal.scss')
-rw-r--r-- | src/scss/components/_modal.scss | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/scss/components/_modal.scss b/src/scss/components/_modal.scss new file mode 100644 index 0000000..bca0ac1 --- /dev/null +++ b/src/scss/components/_modal.scss | |||
@@ -0,0 +1,73 @@ | |||
1 | // Modal Comp | ||
2 | // Options | ||
3 | $iota-components-modal : true; | ||
4 | |||
5 | $iota-components-modal-namespace : 'modal' !default; | ||
6 | $iota-components-modal-dialog-name : 'dialog' !default; | ||
7 | $iota-components-modal-open-name : 'is-modal-open' !default; | ||
8 | $iota-components-modal-active-name : 'is-active' !default; | ||
9 | |||
10 | $iota-components-modal-padding : $iota-global-gutter-default !default; | ||
11 | $iota-components-modal-background : rgba(0, 0, 0, 0.5) !default; | ||
12 | $iota-components-modal-dialog-background : rgb(255, 255, 255) !default; | ||
13 | |||
14 | // Helper Local Variables | ||
15 | $iota-components-modal-var-modal : $iota-global-components-namespace + $iota-components-modal-namespace; | ||
16 | $iota-components-modal-var-modal-active : $iota-components-modal-var-modal + '.' + $iota-components-modal-active-name; | ||
17 | $iota-components-modal-var-modal-dialog : $iota-components-modal-var-modal + '__' + $iota-components-modal-dialog-name; | ||
18 | |||
19 | // Modal Component | ||
20 | |||
21 | .#{$iota-components-modal-open-name} { | ||
22 | position: fixed; | ||
23 | top: 0; | ||
24 | left: 0; | ||
25 | width: 100%; | ||
26 | height: 100%; | ||
27 | overflow: hidden; | ||
28 | } | ||
29 | |||
30 | |||
31 | .#{$iota-components-modal-var-modal} { | ||
32 | position: fixed; | ||
33 | visibility: hidden; | ||
34 | top: 0; | ||
35 | right: 0; | ||
36 | bottom: 0; | ||
37 | left: 0; | ||
38 | overflow: auto; | ||
39 | text-align: center; | ||
40 | opacity: 0; | ||
41 | z-index: 10000; | ||
42 | background: $iota-components-modal-background; | ||
43 | |||
44 | -webkit-overflow-scrolling: touch; | ||
45 | backface-visibility: hidden; | ||
46 | } | ||
47 | |||
48 | .#{$iota-components-modal-var-modal-active} { | ||
49 | visibility: visible; | ||
50 | opacity: 1; | ||
51 | } | ||
52 | |||
53 | .#{$iota-components-modal-var-modal}:after { | ||
54 | display: inline-block; | ||
55 | height: 100%; | ||
56 | margin-left: -0.05em; | ||
57 | content: ""; | ||
58 | vertical-align: middle; | ||
59 | } | ||
60 | |||
61 | |||
62 | .#{$iota-components-modal-var-modal-dialog} { | ||
63 | position: relative; | ||
64 | display: inline-block; | ||
65 | padding: $iota-components-modal-padding; | ||
66 | max-width: 700px; | ||
67 | width: 100%; | ||
68 | background: $iota-components-modal-dialog-background; | ||
69 | vertical-align: middle; | ||
70 | transform: translate3d(0,0,0); | ||
71 | text-size-adjust: 100%; | ||
72 | box-sizing: border-box; | ||
73 | } | ||