Add an exponential backoff to rechecking the app list doodle.
[chromium-blink-merge.git] / third_party / polymer / components-chromium / paper-shadow / demo.html
blobcc5b1bd053d682fcb229f317e485ffcf50ab6b4e
1 <!doctype html>
2 <!--
3 Copyright 2013 The Polymer Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file.
6 -->
7 <html>
8 <head>
9 <title>paper-shadow</title>
11 <meta charset="utf-8">
12 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
13 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
15 <script src="../webcomponentsjs/webcomponents.js"></script>
16 <link href="paper-shadow.html" rel="import">
18 <style>
19 body {
20 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
21 font-size: 14px;
22 margin: 0;
23 padding: 24px;
24 -webkit-tap-highlight-color: rgba(0,0,0,0);
25 -webkit-touch-callout: none;
28 section {
29 padding: 20px 0;
32 section > div {
33 padding: 14px;
34 font-size: 16px;
37 .card {
38 display: inline-block;
39 background: white;
40 box-sizing: border-box;
41 width: 100px;
42 height: 100px;
43 margin: 16px;
44 padding: 16px;
45 border-radius: 2px;
48 .fab {
49 display: inline-block;
50 background: white;
51 box-sizing: border-box;
52 width: 56px;
53 height: 56px;
54 margin: 16px;
55 padding: 16px;
56 border-radius: 50%;
57 text-align: center;
60 </style>
61 </head>
62 <body unresolved>
64 <template is="auto-binding">
66 <section>
68 <div>Shadows</div>
70 <paper-shadow class="card" z="0">
71 z = 0
72 </paper-shadow>
74 <paper-shadow class="card" z="1">
75 z = 1
76 </paper-shadow>
78 <paper-shadow class="card" z="2">
79 z = 2
80 </paper-shadow>
82 <paper-shadow class="card" z="3">
83 z = 3
84 </paper-shadow>
86 <paper-shadow class="card" z="4">
87 z = 4
88 </paper-shadow>
90 <paper-shadow class="card" z="5">
91 z = 5
92 </paper-shadow>
94 </section>
96 <section on-tap="{{tapAction}}">
98 <div>Animated</div>
100 <paper-shadow class="card" z="0" animated>
102 </paper-shadow>
104 <paper-shadow class="fab" z="0" animated layout center-center>
106 </paper-shadow>
108 </section>
110 </template>
112 <script>
114 var scope = document.querySelector('template[is=auto-binding]');
116 scope.tapAction = function(e) {
117 var target = e.target;
118 if (!target.down) {
119 target.setZ(target.z + 1);
120 if (target.z === 5) {
121 target.down = true;
123 } else {
124 target.setZ(target.z - 1);
125 if (target.z === 0) {
126 target.down = false;
131 </script>
133 </body>
134 </html>