| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 2 Copyright (c) 2014 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 | 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 | 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 | 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 | 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 | 7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 8 --> | 8 --> |
| 9 | 9 |
| 10 <!-- | 10 <!-- |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 paper-radio-button::shadow #ink[checked] { | 26 paper-radio-button::shadow #ink[checked] { |
| 27 color: #4285f4; | 27 color: #4285f4; |
| 28 } | 28 } |
| 29 | 29 |
| 30 To change the radio checked color: | 30 To change the radio checked color: |
| 31 | 31 |
| 32 paper-radio-button::shadow #onRadio { | 32 paper-radio-button::shadow #onRadio { |
| 33 background-color: #4285f4; | 33 background-color: #4285f4; |
| 34 } | 34 } |
| 35 | 35 |
| 36 paper-radio-button[checked]::shadow #offRadio { |
| 37 border-color: #4285f4; |
| 38 } |
| 39 |
| 36 To change the ink color for unchecked state: | 40 To change the ink color for unchecked state: |
| 37 | 41 |
| 38 paper-radio-button::shadow #ink { | 42 paper-radio-button::shadow #ink { |
| 39 color: #b5b5b5; | 43 color: #b5b5b5; |
| 40 } | 44 } |
| 41 | 45 |
| 42 To change the radio unchecked color: | 46 To change the radio unchecked color: |
| 43 | 47 |
| 44 paper-radio-button::shadow #offRadio { | 48 paper-radio-button::shadow #offRadio { |
| 45 border-color: #b5b5b5; | 49 border-color: #b5b5b5; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if (this.checked !== old) { | 145 if (this.checked !== old) { |
| 142 this.fire('change'); | 146 this.fire('change'); |
| 143 } | 147 } |
| 144 }, | 148 }, |
| 145 | 149 |
| 146 toggle: function() { | 150 toggle: function() { |
| 147 this.checked = !this.toggles || !this.checked; | 151 this.checked = !this.toggles || !this.checked; |
| 148 }, | 152 }, |
| 149 | 153 |
| 150 checkedChanged: function() { | 154 checkedChanged: function() { |
| 151 this.$.onRadio.classList.toggle('fill', this.checked); | 155 this.setAttribute('aria-checked', this.checked ? 'true' : 'false'); |
| 152 this.setAttribute('aria-checked', this.checked ? 'true': 'false'); | |
| 153 this.fire('core-change'); | 156 this.fire('core-change'); |
| 154 }, | 157 }, |
| 155 | 158 |
| 156 labelChanged: function() { | 159 labelChanged: function() { |
| 157 this.setAttribute('aria-label', this.label); | 160 this.setAttribute('aria-label', this.label); |
| 158 } | 161 } |
| 159 | 162 |
| 160 }); | 163 }); |
| 161 | 164 |
| 162 </script> | 165 </script> |
| 163 </polymer-element> | 166 </polymer-element> |
| OLD | NEW |