Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/polymer/v0_8/components-chromium/paper-card/demo/index.html

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rerun reproduce.sh Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
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
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
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
9 -->
10 <html>
11 <head>
12 <title>paper-card</title>
13
14 <meta charset="utf-8">
15 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
16 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial- scale=1, user-scalable=yes">
17
18 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
19 <link rel="import" href="../../paper-styles/layout.html">
20 <link rel="import" href="../../paper-styles/typography.html">
21 <link rel="import" href="../paper-card.html">
22
23 <style>
24 body {
25 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
26 font-size: 14px;
27 margin: 0;
28 padding: 24px;
29 -webkit-tap-highlight-color: rgba(0,0,0,0);
30 -webkit-touch-callout: none;
31 }
32 </style>
33
34 </head>
35 <body>
36 <template is="x-autobind" id="demo">
37 <style>
38 section {
39 padding: 20px 0;
40 }
41
42 section > div {
43 padding: 14px;
44 font-size: 16px;
45 }
46
47 paper-card {
48 display: inline-block;
49 background: white;
50 box-sizing: border-box;
51 margin: 16px;
52 padding: 16px;
53 border-radius: 2px;
54 }
55
56 .fab {
57 display: inline-block;
58 background: white;
59 box-sizing: border-box;
60 width: 56px;
61 height: 56px;
62 margin: 16px;
63 padding: 16px;
64 border-radius: 50%;
65 text-align: center;
66 cursor: pointer;
67 }
68 </style>
69 <section>
70 <div>Card Elevations</div>
71
72 <paper-card elevation="0">
73 elevation = 0
74 </paper-card>
75
76 <paper-card elevation="1">
77 elevation = 1
78 </paper-card>
79
80 <paper-card elevation="2">
81 elevation = 2
82 </paper-card>
83
84 <paper-card elevation="3">
85 elevation = 3
86 </paper-card>
87
88 <paper-card elevation="4">
89 elevation = 4
90 </paper-card>
91
92 <paper-card elevation="5">
93 elevation = 5
94 </paper-card>
95 </section>
96
97 <section on-click="tapAction">
98 <div>Animated</div>
99
100 <paper-card elevation="0" animated>
101 tap
102 </paper-card>
103
104 <paper-card class="fab layout center-center" elevation="0" animated>
105 tap
106 </paper-card>
107 </section>
108 </template>
109
110 <script>
111
112 demo.tapAction = function(e) {
113 var target = e.target;
114 if (!target.down) {
115 target.elevation += 1;
116 if (target.elevation === 5) {
117 target.down = true;
118 }
119 } else {
120 target.elevation -= 1;
121 if (target.elevation === 0) {
122 target.down = false;
123 }
124 }
125 };
126
127 </script>
128
129 </body>
130 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698