OLD | NEW |
1 <!-- | 1 <!-- |
2 @license | 2 @license |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
9 --> | 9 --> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 Custom property | Description | Default | 21 Custom property | Description | Default |
22 -------------------------------------------|------------------------|--------- | 22 -------------------------------------------|------------------------|--------- |
23 `--iron-overlay-backdrop-background-color` | Backdrop background color
| #000 | 23 `--iron-overlay-backdrop-background-color` | Backdrop background color
| #000 |
24 `--iron-overlay-backdrop-opacity` | Backdrop opacity
| 0.6 | 24 `--iron-overlay-backdrop-opacity` | Backdrop opacity
| 0.6 |
25 `--iron-overlay-backdrop` | Mixin applied to `iron-overlay-back
drop`. | {} | 25 `--iron-overlay-backdrop` | Mixin applied to `iron-overlay-back
drop`. | {} |
26 `--iron-overlay-backdrop-opened` | Mixin applied to `iron-overlay-back
drop` when it is displayed | {} | 26 `--iron-overlay-backdrop-opened` | Mixin applied to `iron-overlay-back
drop` when it is displayed | {} |
27 --> | 27 --> |
28 | 28 |
29 <dom-module id="iron-overlay-backdrop"> | 29 <dom-module id="iron-overlay-backdrop"> |
30 | 30 |
31 <style> | 31 <template> |
32 :host { | 32 <style> |
33 position: fixed; | 33 :host { |
34 top: 0; | 34 position: fixed; |
35 left: 0; | 35 top: 0; |
36 width: 100%; | 36 left: 0; |
37 height: 100%; | 37 width: 100%; |
38 background-color: var(--iron-overlay-backdrop-background-color, #000); | 38 height: 100%; |
39 opacity: 0; | 39 background-color: var(--iron-overlay-backdrop-background-color, #000); |
40 transition: opacity 0.2s; | 40 opacity: 0; |
41 pointer-events: none; | 41 transition: opacity 0.2s; |
42 @apply(--iron-overlay-backdrop); | 42 pointer-events: none; |
43 } | 43 @apply(--iron-overlay-backdrop); |
| 44 } |
44 | 45 |
45 :host(.opened) { | 46 :host(.opened) { |
46 opacity: var(--iron-overlay-backdrop-opacity, 0.6); | 47 opacity: var(--iron-overlay-backdrop-opacity, 0.6); |
47 pointer-events: auto; | 48 pointer-events: auto; |
48 @apply(--iron-overlay-backdrop-opened); | 49 @apply(--iron-overlay-backdrop-opened); |
49 } | 50 } |
50 </style> | 51 </style> |
51 | 52 |
52 <template> | |
53 <content></content> | 53 <content></content> |
54 </template> | 54 </template> |
55 | 55 |
56 </dom-module> | 56 </dom-module> |
57 | 57 |
58 <script> | 58 <script> |
59 (function() { | 59 (function() { |
60 'use strict'; | 60 'use strict'; |
61 | 61 |
62 Polymer({ | 62 Polymer({ |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 this.__openedRaf = window.requestAnimationFrame(function() { | 159 this.__openedRaf = window.requestAnimationFrame(function() { |
160 this.__openedRaf = null; | 160 this.__openedRaf = null; |
161 this.toggleClass('opened', this.opened); | 161 this.toggleClass('opened', this.opened); |
162 }.bind(this)); | 162 }.bind(this)); |
163 } | 163 } |
164 }); | 164 }); |
165 | 165 |
166 })(); | 166 })(); |
167 | 167 |
168 </script> | 168 </script> |
OLD | NEW |