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="../color.html"> | |
13 <link rel="import" href="../default-theme.html"> | |
14 <link rel="import" href="../typography.html"> | |
15 | |
16 <!-- | |
17 Material design: [Lists](https://www.google.com/design/spec/components/lists.htm
l) | |
18 | |
19 Shared styles for a native `button` to be used as an item in a `paper-listbox` e
lement: | |
20 | |
21 <custom-style> | |
22 <style is="custom-style" include="paper-item"></style> | |
23 </custom-style> | |
24 | |
25 <paper-listbox> | |
26 <button class="paper-item" role="option">Inbox</button> | |
27 <button class="paper-item" role="option">Starred</button> | |
28 <button class="paper-item" role="option">Sent mail</button> | |
29 </paper-listbox> | |
30 | |
31 @group Paper Elements | |
32 @demo demo/index.html | |
33 --> | |
34 | |
35 <dom-module id="paper-item"> | |
36 <template> | |
37 <style> | |
38 :host, html { | |
39 --paper-item: { | |
40 display: block; | |
41 position: relative; | |
42 min-height: var(--paper-item-min-height, 48px); | |
43 padding: 0px 16px; | |
44 @apply --paper-font-subhead; | |
45 border:none; | |
46 outline: none; | |
47 background: white; | |
48 width: 100%; | |
49 text-align: left; | |
50 }; | |
51 } | |
52 .paper-item { | |
53 @apply --paper-item; | |
54 } | |
55 | |
56 .paper-item[hidden] { | |
57 display: none !important; | |
58 } | |
59 | |
60 .paper-item.iron-selected { | |
61 font-weight: var(--paper-item-selected-weight, bold); | |
62 @apply --paper-item-selected; | |
63 } | |
64 | |
65 .paper-item[disabled] { | |
66 color: var(--paper-item-disabled-color, var(--disabled-text-color)); | |
67 @apply --paper-item-disabled; | |
68 } | |
69 | |
70 .paper-item:focus { | |
71 position: relative; | |
72 outline: 0; | |
73 @apply --paper-item-focused; | |
74 } | |
75 | |
76 .paper-item:focus:before { | |
77 position: absolute; | |
78 top: 0; | |
79 left: 0; | |
80 right: 0; | |
81 bottom: 0; | |
82 background: currentColor; | |
83 content: ''; | |
84 opacity: var(--dark-divider-opacity); | |
85 pointer-events: none; | |
86 @apply --paper-item-focused-before; | |
87 } | |
88 </style> | |
89 </template> | |
90 </dom-module> | |
OLD | NEW |