| 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 .hidden { | |
| 20 display: none; | |
| 21 } | |
| 22 | |
| 23 #checkboxContainer { | |
| 24 display: inline-block; | |
| 25 position: relative; | |
| 26 width: 18px; | |
| 27 height: 18px; | |
| 28 cursor: pointer; | |
| 29 -webkit-transform: translateZ(0); | |
| 30 transform: translateZ(0); | |
| 31 vertical-align: middle; | |
| 32 } | |
| 33 | |
| 34 :host #ink { | |
| 35 position: absolute; | |
| 36 top: -15px; | |
| 37 left: -15px; | |
| 38 width: 48px; | |
| 39 height: 48px; | |
| 40 color: var(--paper-checkbox-unchecked-ink-color); | |
| 41 opacity: 0.6; | |
| 42 } | |
| 43 | |
| 44 :host #ink[checked] { | |
| 45 color: var(--paper-checkbox-checked-ink-color); | |
| 46 } | |
| 47 | |
| 48 :host #checkbox { | |
| 49 position: relative; | |
| 50 box-sizing: border-box; | |
| 51 height: 100%; | |
| 52 border: solid 2px; | |
| 53 border-color: var(--paper-checkbox-unchecked-color); | |
| 54 border-radius: 2px; | |
| 55 pointer-events: none; | |
| 56 -webkit-transition: background-color 140ms, border-color 140ms; | |
| 57 transition: background-color 140ms, border-color 140ms; | |
| 58 } | |
| 59 | |
| 60 /* checkbox checked animations */ | |
| 61 #checkbox.checked #checkmark { | |
| 62 -webkit-animation: checkmark-expand 140ms ease-out forwards; | |
| 63 animation: checkmark-expand 140ms ease-out forwards; | |
| 64 } | |
| 65 | |
| 66 @-webkit-keyframes checkmark-expand { | |
| 67 0% { | |
| 68 top: 9px; | |
| 69 left: 6px; | |
| 70 width: 0px; | |
| 71 height: 0px; | |
| 72 } | |
| 73 100% { | |
| 74 top: -1px; | |
| 75 left: 4px; | |
| 76 width: 5px; | |
| 77 height: 10px; | |
| 78 } | |
| 79 } | |
| 80 | |
| 81 @keyframes checkmark-expand { | |
| 82 0% { | |
| 83 top: 9px; | |
| 84 left: 6px; | |
| 85 width: 0px; | |
| 86 height: 0px; | |
| 87 } | |
| 88 100% { | |
| 89 top: -1px; | |
| 90 left: 4px; | |
| 91 width: 5px; | |
| 92 height: 10px; | |
| 93 } | |
| 94 } | |
| 95 | |
| 96 :host #checkbox.checked { | |
| 97 background-color: var(--paper-checkbox-checked-color); | |
| 98 border-color: var(--paper-checkbox-checked-color); | |
| 99 } | |
| 100 | |
| 101 :host #checkmark { | |
| 102 -webkit-transform: rotate(45deg); | |
| 103 transform: rotate(45deg); | |
| 104 position: absolute; | |
| 105 top: -1px; | |
| 106 left: 4px; | |
| 107 width: 5px; | |
| 108 height: 10px; | |
| 109 border-style: solid; | |
| 110 border-top: none; | |
| 111 border-left: none; | |
| 112 border-right-width: 2px; | |
| 113 border-bottom-width: 2px; | |
| 114 border-color: white; | |
| 115 } | |
| 116 | |
| 117 /* label */ | |
| 118 #checkboxLabel { | |
| 119 position: relative; | |
| 120 display: inline-block; | |
| 121 vertical-align: middle; | |
| 122 padding-left: 8px; | |
| 123 white-space: normal; | |
| 124 pointer-events: none; | |
| 125 color: var(--paper-checkbox-label-color); | |
| 126 } | |
| 127 | |
| 128 #checkboxLabel[hidden] { | |
| 129 display: none; | |
| 130 } | |
| 131 | |
| 132 /* disabled state */ | |
| 133 :host([disabled]) { | |
| 134 pointer-events: none; | |
| 135 } | |
| 136 | |
| 137 :host([disabled]) #checkbox { | |
| 138 opacity: 0.5; | |
| 139 border-color: var(--paper-checkbox-unchecked-color); | |
| 140 } | |
| 141 | |
| 142 :host([disabled][checked]) #checkbox { | |
| 143 background-color: var(--paper-checkbox-unchecked-color); | |
| 144 opacity: 0.5; | |
| 145 } | |
| 146 | |
| 147 :host([disabled]) #checkboxLabel { | |
| 148 opacity: 0.65; | |
| 149 } | |
| OLD | NEW |