| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 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 | 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 | 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 | 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 | 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 | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --><html><head><link rel="import" href="../polymer/polymer.html"> | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
| 10 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | 10 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 </paper-item> | 30 </paper-item> |
| 31 | 31 |
| 32 To use `paper-item` as a link, wrap it in an anchor tag. Since `paper-item` will | 32 To use `paper-item` as a link, wrap it in an anchor tag. Since `paper-item` will |
| 33 already receive focus, you may want to prevent the anchor tag from receiving | 33 already receive focus, you may want to prevent the anchor tag from receiving |
| 34 focus as well by setting its tabindex to -1. | 34 focus as well by setting its tabindex to -1. |
| 35 | 35 |
| 36 <a href="https://www.polymer-project.org/" tabindex="-1"> | 36 <a href="https://www.polymer-project.org/" tabindex="-1"> |
| 37 <paper-item raised>Polymer Project</paper-item> | 37 <paper-item raised>Polymer Project</paper-item> |
| 38 </a> | 38 </a> |
| 39 | 39 |
| 40 If you are concerned about performance and want to use `paper-item` in a `paper-
listbox` |
| 41 with many items, you can just use a native `button` with the `paper-item` class |
| 42 applied (provided you have correctly included the shared styles): |
| 43 |
| 44 <style is="custom-style" include="paper-item-shared-styles"></style> |
| 45 |
| 46 <paper-listbox> |
| 47 <button class="paper-item" role="option">Inbox</button> |
| 48 <button class="paper-item" role="option">Starred</button> |
| 49 <button class="paper-item" role="option">Sent mail</button> |
| 50 </paper-listbox> |
| 51 |
| 40 ### Styling | 52 ### Styling |
| 41 | 53 |
| 42 The following custom properties and mixins are available for styling: | 54 The following custom properties and mixins are available for styling: |
| 43 | 55 |
| 44 Custom property | Description | D
efault | 56 Custom property | Description | D
efault |
| 45 ------------------------------|----------------------------------------------|--
-------- | 57 ------------------------------|----------------------------------------------|--
-------- |
| 46 `--paper-item-min-height` | Minimum height of the item | `
48px` | 58 `--paper-item-min-height` | Minimum height of the item | `
48px` |
| 47 `--paper-item` | Mixin applied to the item | `
{}` | 59 `--paper-item` | Mixin applied to the item | `
{}` |
| 48 `--paper-item-selected-weight`| The font weight of a selected item | `
bold` | 60 `--paper-item-selected-weight`| The font weight of a selected item | `
bold` |
| 49 `--paper-item-selected` | Mixin applied to selected paper-items | `
{}` | 61 `--paper-item-selected` | Mixin applied to selected paper-items | `
{}` |
| (...skipping 30 matching lines...) Expand all Loading... |
| 80 | 92 |
| 81 @apply(--paper-item); | 93 @apply(--paper-item); |
| 82 } | 94 } |
| 83 </style> | 95 </style> |
| 84 | 96 |
| 85 <content></content> | 97 <content></content> |
| 86 </template> | 98 </template> |
| 87 | 99 |
| 88 </dom-module> | 100 </dom-module> |
| 89 <script src="paper-item-extracted.js"></script></body></html> | 101 <script src="paper-item-extracted.js"></script></body></html> |
| OLD | NEW |