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 | 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 | 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 | 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 | 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-icon/iron-icon.html"> | 10 <link rel="import" href="../iron-icon/iron-icon.html"> |
11 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | 11 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
12 <link rel="import" href="../paper-styles/default-theme.html"> | 12 <link rel="import" href="../paper-styles/default-theme.html"> |
13 <link rel="import" href="../paper-behaviors/paper-button-behavior.html"> | 13 <link rel="import" href="../paper-behaviors/paper-button-behavior.html"> |
14 <link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html"> | 14 <link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html"> |
15 <link rel="import" href="../paper-ripple/paper-ripple.html"> | 15 <link rel="import" href="../paper-ripple/paper-ripple.html"> |
16 | 16 |
17 <!-- | 17 <!-- |
18 Material design: [Icon toggles](https://www.google.com/design/spec/components/bu
ttons.html#buttons-toggle-buttons) | 18 Material design: [Icon toggles](https://www.google.com/design/spec/components/bu
ttons.html#buttons-toggle-buttons) |
(...skipping 28 matching lines...) Expand all Loading... |
47 customize the color using the `--paper-icon-button-ink-color` custom property. | 47 customize the color using the `--paper-icon-button-ink-color` custom property. |
48 | 48 |
49 The following custom properties and mixins are available for styling: | 49 The following custom properties and mixins are available for styling: |
50 | 50 |
51 Custom property | Description | Default | 51 Custom property | Description | Default |
52 ----------------|-------------|---------- | 52 ----------------|-------------|---------- |
53 `--paper-icon-button-disabled-text` | The color of the disabled button | `--disa
bled-text-color` | 53 `--paper-icon-button-disabled-text` | The color of the disabled button | `--disa
bled-text-color` |
54 `--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-
color` | 54 `--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-
color` |
55 `--paper-icon-button` | Mixin for a button | `{}` | 55 `--paper-icon-button` | Mixin for a button | `{}` |
56 `--paper-icon-button-disabled` | Mixin for a disabled button | `{}` | 56 `--paper-icon-button-disabled` | Mixin for a disabled button | `{}` |
| 57 `--paper-icon-button-hover` | Mixin for button on hover | `{}` |
57 | 58 |
58 @group Paper Elements | 59 @group Paper Elements |
59 @element paper-icon-button | 60 @element paper-icon-button |
60 @demo demo/index.html | 61 @demo demo/index.html |
61 --> | 62 --> |
62 | 63 |
63 </head><body><dom-module id="paper-icon-button"> | 64 </head><body><dom-module id="paper-icon-button"> |
64 <template strip-whitespace=""> | 65 <template strip-whitespace=""> |
65 <style> | 66 <style> |
66 :host { | 67 :host { |
(...skipping 22 matching lines...) Expand all Loading... |
89 color: var(--paper-icon-button-ink-color, --primary-text-color); | 90 color: var(--paper-icon-button-ink-color, --primary-text-color); |
90 opacity: 0.6; | 91 opacity: 0.6; |
91 } | 92 } |
92 | 93 |
93 :host([disabled]) { | 94 :host([disabled]) { |
94 color: var(--paper-icon-button-disabled-text, --disabled-text-color); | 95 color: var(--paper-icon-button-disabled-text, --disabled-text-color); |
95 pointer-events: none; | 96 pointer-events: none; |
96 cursor: auto; | 97 cursor: auto; |
97 @apply(--paper-icon-button-disabled); | 98 @apply(--paper-icon-button-disabled); |
98 } | 99 } |
| 100 |
| 101 :host(:hover) { |
| 102 @apply(--paper-icon-button-hover); |
| 103 } |
99 | 104 |
100 iron-icon { | 105 iron-icon { |
101 --iron-icon-width: 100%; | 106 --iron-icon-width: 100%; |
102 --iron-icon-height: 100%; | 107 --iron-icon-height: 100%; |
103 } | 108 } |
104 </style> | 109 </style> |
105 <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-ico
n> | 110 <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-ico
n> |
106 </template> | 111 </template> |
107 | 112 |
108 </dom-module> | 113 </dom-module> |
109 <script src="paper-icon-button-extracted.js"></script></body></html> | 114 <script src="paper-icon-button-extracted.js"></script></body></html> |
OLD | NEW |