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

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

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove polymer/explainer Created 5 years, 7 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 <!--
2 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
8 -->
9
10 <!--
11
12 `paper-card` is a container that renders two shadows on top of each other to
13 create the effect of a lifted piece of paper.
14
15 Example:
16
17 <paper-card elevation="1">
18 ... card content ...
19 </paper-card>
20
21 @group Paper Elements
22 @class paper-card
23 -->
24
25 <link href="../polymer/polymer.html" rel="import">
26 <link href="../paper-styles/shadow.html" rel="import">
27 <dom-module id="paper-card">
28 <style>
29 :host {
30 display: block;
31 position: relative;
32 mixin(--shadow-transition);
33 }
34
35 :host([elevation="1"]) {
36 mixin(--shadow-elevation-1);
37 }
38
39 :host([elevation="2"]) {
40 mixin(--shadow-elevation-2);
41 }
42
43 :host([elevation="3"]) {
44 mixin(--shadow-elevation-3);
45 }
46
47 :host([elevation="4"]) {
48 mixin(--shadow-elevation-4);
49 }
50
51 :host([elevation="5"]) {
52 mixin(--shadow-elevation-5);
53 }
54 </style>
55 <template>
56 <content></content>
57 </template>
58 </dom-module>
59 <script>
60 Polymer({
61 is: 'paper-card',
62
63 enableCustomStyleProperties: true,
64
65 properties: {
66
67 /**
68 * The z-depth of this card, from 0-5. Setting to 0 will remove the
69 * shadow, and each increasing number greater than 0 will be "deeper"
70 * than the last.
71 *
72 * @attribute elevation
73 * @type number
74 * @default 1
75 */
76 elevation: {
77 type: Number,
78 reflectToAttribute: true,
79 value: 1
80 },
81
82 /**
83 * Set this to true to animate the shadow when setting a new
84 * `elevation` value.
85 *
86 * @attribute animated
87 * @type boolean
88 * @default false
89 */
90 animated: {
91 type: Boolean,
92 reflectToAttribute: true,
93 value: false
94 }
95 }
96 });
97 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698