| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 3 Copyright (c) 2017 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 | |
| 11 <link rel="import" href="../../polymer/polymer.html"> | |
| 12 <link rel="import" href="../shadow.html"> | |
| 13 | |
| 14 <!-- | |
| 15 Material design: [Cards](https://www.google.com/design/spec/components/cards.htm
l) | |
| 16 | |
| 17 Shared styles that you can apply to an element to renders two shadows on top | |
| 18 of each other,that create the effect of a lifted piece of paper. | |
| 19 | |
| 20 Example: | |
| 21 | |
| 22 <custom-style> | |
| 23 <style is="custom-style" include="paper-material"></style> | |
| 24 </custom-style> | |
| 25 | |
| 26 <div class="paper-material elevation-1"> | |
| 27 ... content ... | |
| 28 </div> | |
| 29 | |
| 30 @group Paper Elements | |
| 31 @demo demo/index.html | |
| 32 --> | |
| 33 | |
| 34 <dom-module id="paper-material"> | |
| 35 <template> | |
| 36 <style> | |
| 37 :host, html { | |
| 38 --paper-material: { | |
| 39 display: block; | |
| 40 position: relative; | |
| 41 }; | |
| 42 --paper-material-elevation-1: { | |
| 43 @apply --shadow-elevation-2dp; | |
| 44 }; | |
| 45 --paper-material-elevation-2: { | |
| 46 @apply --shadow-elevation-4dp; | |
| 47 }; | |
| 48 --paper-material-elevation-3: { | |
| 49 @apply --shadow-elevation-6dp; | |
| 50 }; | |
| 51 --paper-material-elevation-4: { | |
| 52 @apply --shadow-elevation-8dp; | |
| 53 }; | |
| 54 --paper-material-elevation-5: { | |
| 55 @apply --shadow-elevation-16dp; | |
| 56 }; | |
| 57 } | |
| 58 :host(.paper-material), .paper-material { | |
| 59 @apply --paper-material; | |
| 60 } | |
| 61 :host(.paper-material[elevation="1"]), .paper-material[elevation="1"] { | |
| 62 @apply --paper-material-elevation-1; | |
| 63 } | |
| 64 :host(.paper-material[elevation="2"]), .paper-material[elevation="2"] { | |
| 65 @apply --paper-material-elevation-2; | |
| 66 } | |
| 67 :host(.paper-material[elevation="3"]), .paper-material[elevation="3"] { | |
| 68 @apply --paper-material-elevation-3; | |
| 69 } | |
| 70 :host(.paper-material[elevation="4"]), .paper-material[elevation="4"] { | |
| 71 @apply --paper-material-elevation-4; | |
| 72 } | |
| 73 :host(.paper-material[elevation="5"]), .paper-material[elevation="5"] { | |
| 74 @apply --paper-material-elevation-5; | |
| 75 } | |
| 76 </style> | |
| 77 </template> | |
| 78 </dom-module> | |
| OLD | NEW |