-
Notifications
You must be signed in to change notification settings - Fork 3
/
iron-overlay-renderer-shared-styles.html
104 lines (91 loc) · 3.31 KB
/
iron-overlay-renderer-shared-styles.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer-element.html">
<!--
### Styling
The following custom properties and mixins are available for styling.
Custom property | Description | Default
----------------|-------------|----------
`--iron-overlay-background-color` | Overlay background color | `white`
`--iron-backdrop-background-color` | Overlay backdrop color | `black`
`--iron-backdrop-opacity` | Overlay backdrop opacity | `0.6`
`--iron-overlay` | Mixin applied to the overlay | `{}`
`--iron-overlay-opened` | Mixin applied to the animated and opened overlay | `{}`
`--iron-backdrop` | Mixin applied to the backdrop | `{}`
`--iron-backdrop-opened` | Mixin applied to the backdrop when overlay is opened | `{}`
-->
<dom-module id="iron-overlay-renderer-shared-styles">
<template strip-whitespace>
<style>
:host {
/* Take full screen */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
/* Center content horizontally & vertically */
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
z-index: 101;
outline: none;
pointer-events: none;
}
:host([no-cancel-on-outside-click]) {
pointer-events: all;
}
#backdrop {
/* Take full screen */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
background-color: transparent;
opacity: 0;
transition: background-color .2s, opacity .2s;
@apply --iron-backdrop;
@apply --iron-backdrop-closed;
}
:host([with-backdrop]) #backdrop.opened {
background-color: var(--iron-backdrop-background-color, black);
opacity: var(--iron-backdrop-opacity, 0.6);
@apply --iron-backdrop-opened;
}
#overlay {
background-color: var(--iron-overlay-background-color, white);
opacity: 0;
transition: opacity .2s;
@apply --iron-overlay;
@apply --iron-overlay-closed;
}
#overlay.opened {
pointer-events: all;
opacity: 1;
@apply --iron-overlay-opened;
}
:host(:not([animated])) #overlay,
:host(:not([animated])) #backdrop {
transition: none;
}
</style>
</template>
</dom-module>