OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- | 2 <!-- |
3 @license | 3 @license |
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
8 Code distributed by Google as part of the polymer project is also | 8 Code distributed by Google as part of the polymer project is also |
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
10 --> | 10 --> |
11 <html> | 11 <html> |
12 <head> | 12 <head> |
13 <title>paper-material demo</title> | 13 <title>paper-material demo</title> |
14 | 14 |
15 <meta charset="utf-8"> | 15 <meta charset="utf-8"> |
16 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 16 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
17 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> | 17 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> |
18 | 18 |
19 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | 19 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
20 <link rel="import" href="../../iron-flex-layout/classes/iron-flex-layout.html"
> | 20 <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html"> |
21 <link rel="import" href="../../paper-styles/typography.html"> | 21 <link rel="import" href="../../paper-styles/typography.html"> |
22 <link rel="import" href="../paper-material.html"> | 22 <link rel="import" href="../paper-material.html"> |
23 | |
24 <link rel="stylesheet" href="../../paper-styles/demo.css"> | 23 <link rel="stylesheet" href="../../paper-styles/demo.css"> |
25 | 24 |
26 </head> | 25 </head> |
27 <body> | 26 <body unresolved> |
28 <template is="dom-bind" id="demo"> | 27 <template is="dom-bind" id="demo"> |
29 <style> | 28 <style is="custom-style"> |
30 paper-material { | 29 paper-material { |
31 display: inline-block; | 30 display: inline-block; |
32 background: white; | 31 background: white; |
33 box-sizing: border-box; | 32 box-sizing: border-box; |
34 margin: 16px; | 33 margin: 16px; |
35 padding: 16px; | 34 padding: 16px; |
36 border-radius: 2px; | 35 border-radius: 2px; |
37 } | 36 } |
38 | 37 |
39 .fab { | 38 .fab { |
40 display: inline-block; | 39 display: inline-block; |
41 background: white; | 40 background: white; |
42 box-sizing: border-box; | 41 box-sizing: border-box; |
43 width: 56px; | 42 width: 56px; |
44 height: 56px; | 43 height: 56px; |
45 margin: 16px; | 44 margin: 16px; |
46 padding: 16px; | 45 padding: 16px; |
47 border-radius: 50%; | 46 border-radius: 50%; |
48 text-align: center; | 47 text-align: center; |
49 cursor: pointer; | 48 cursor: pointer; |
| 49 @apply(--layout-center-center); |
50 } | 50 } |
51 </style> | 51 </style> |
52 <section> | 52 <section> |
53 <div>Paper Elevations</div> | 53 <div>Paper Elevations</div> |
54 | 54 |
55 <paper-material elevation="0"> | 55 <paper-material elevation="0"> |
56 elevation = 0 | 56 elevation = 0 |
57 </paper-material> | 57 </paper-material> |
58 | 58 |
59 <paper-material elevation="1"> | 59 <paper-material elevation="1"> |
(...skipping 17 matching lines...) Expand all Loading... |
77 </paper-material> | 77 </paper-material> |
78 </section> | 78 </section> |
79 | 79 |
80 <section on-click="tapAction"> | 80 <section on-click="tapAction"> |
81 <div>Animated</div> | 81 <div>Animated</div> |
82 | 82 |
83 <paper-material elevation="0" animated> | 83 <paper-material elevation="0" animated> |
84 tap | 84 tap |
85 </paper-material> | 85 </paper-material> |
86 | 86 |
87 <paper-material class="fab layout center-center" elevation="0" animated> | 87 <paper-material class="fab" elevation="0" animated> |
88 tap | 88 tap |
89 </paper-material> | 89 </paper-material> |
90 </section> | 90 </section> |
91 </template> | 91 </template> |
92 | 92 |
93 <script> | 93 <script> |
94 | 94 |
95 demo.tapAction = function(e) { | 95 demo.tapAction = function(e) { |
96 var target = e.target; | 96 var target = e.target; |
97 if (!target.down) { | 97 if (!target.down) { |
98 target.elevation += 1; | 98 target.elevation += 1; |
99 if (target.elevation === 5) { | 99 if (target.elevation === 5) { |
100 target.down = true; | 100 target.down = true; |
101 } | 101 } |
102 } else { | 102 } else { |
103 target.elevation -= 1; | 103 target.elevation -= 1; |
104 if (target.elevation === 0) { | 104 if (target.elevation === 0) { |
105 target.down = false; | 105 target.down = false; |
106 } | 106 } |
107 } | 107 } |
108 }; | 108 }; |
109 | 109 |
110 </script> | 110 </script> |
111 | 111 |
112 </body> | 112 </body> |
113 </html> | 113 </html> |
OLD | NEW |