diff options
Diffstat (limited to 'src/scss')
-rw-r--r-- | src/scss/components/_modal.scss | 73 | ||||
-rw-r--r-- | src/scss/main.scss | 1 |
2 files changed, 74 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 | } | ||
diff --git a/src/scss/main.scss b/src/scss/main.scss index 18b0408..3865945 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss | |||
@@ -34,6 +34,7 @@ | |||
34 | @import 'components/markdown'; | 34 | @import 'components/markdown'; |
35 | @import 'components/circle'; | 35 | @import 'components/circle'; |
36 | @import 'components/dropdown'; | 36 | @import 'components/dropdown'; |
37 | @import 'components/modal'; | ||
37 | 38 | ||
38 | //@import 'utilities/align-items'; | 39 | //@import 'utilities/align-items'; |
39 | @import 'utilities/align'; | 40 | @import 'utilities/align'; |