| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 Copyright (c) 2015 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 | |
| 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 | |
| 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 | |
| 8 */ | |
| 9 | |
| 10 :host { | |
| 11 display: inline-block; | |
| 12 white-space: nowrap; | |
| 13 } | |
| 14 | |
| 15 :host(:focus) { | |
| 16 outline: none; | |
| 17 } | |
| 18 | |
| 19 #radioContainer { | |
| 20 display: inline-block; | |
| 21 position: relative; | |
| 22 width: 16px; | |
| 23 height: 16px; | |
| 24 cursor: pointer; | |
| 25 vertical-align: middle; | |
| 26 } | |
| 27 | |
| 28 :host #ink { | |
| 29 position: absolute; | |
| 30 top: -16px; | |
| 31 left: -16px; | |
| 32 width: 48px; | |
| 33 height: 48px; | |
| 34 color: var(--paper-radio-button-unchecked-ink-color); | |
| 35 opacity: 0.6; | |
| 36 } | |
| 37 | |
| 38 :host #ink[checked] { | |
| 39 color: var(--paper-radio-button-checked-ink-color); | |
| 40 } | |
| 41 | |
| 42 :host #offRadio { | |
| 43 position: absolute; | |
| 44 top: 0px; | |
| 45 left: 0px; | |
| 46 width: 12px; | |
| 47 height: 12px; | |
| 48 border-radius: 50%; | |
| 49 border: solid 2px; | |
| 50 border-color: var(--paper-radio-button-unchecked-color); | |
| 51 transition: border-color 0.28s; | |
| 52 } | |
| 53 | |
| 54 :host #onRadio { | |
| 55 position: absolute; | |
| 56 top: 4px; | |
| 57 left: 4px; | |
| 58 width: 8px; | |
| 59 height: 8px; | |
| 60 border-radius: 50%; | |
| 61 background-color: var(--paper-radio-button-checked-color); | |
| 62 -webkit-transform: scale(0); | |
| 63 transform: scale(0); | |
| 64 transition: -webkit-transform ease 0.28s; | |
| 65 transition: transform ease 0.28s; | |
| 66 } | |
| 67 | |
| 68 :host([checked]) #offRadio { | |
| 69 border-color: var(--paper-radio-button-checked-color); | |
| 70 } | |
| 71 | |
| 72 :host([checked]) #onRadio { | |
| 73 -webkit-transform: scale(1); | |
| 74 transform: scale(1); | |
| 75 } | |
| 76 | |
| 77 #radioLabel { | |
| 78 position: relative; | |
| 79 display: inline-block; | |
| 80 vertical-align: middle; | |
| 81 margin-left: 10px; | |
| 82 white-space: normal; | |
| 83 pointer-events: none; | |
| 84 color: var(--paper-radio-button-label-color); | |
| 85 } | |
| 86 | |
| 87 #radioLabel[hidden] { | |
| 88 display: none; | |
| 89 } | |
| 90 | |
| 91 /* disabled state */ | |
| 92 :host([disabled]) { | |
| 93 pointer-events: none; | |
| 94 } | |
| 95 | |
| 96 :host([disabled]) #offRadio { | |
| 97 border-color: var(--paper-radio-button-unchecked-color); | |
| 98 opacity: 0.5; | |
| 99 } | |
| 100 | |
| 101 :host([disabled][checked]) #onRadio { | |
| 102 background-color: var(--paper-radio-button-unchecked-color); | |
| 103 opacity: 0.5; | |
| 104 } | |
| 105 | |
| 106 :host([disabled]) #radioLabel { | |
| 107 /* slightly darker than the button, so that it's readable */ | |
| 108 opacity: 0.65; | |
| 109 } | |
| OLD | NEW |