| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2016 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="../paper-styles/default-theme.html"> | 10 <link rel="import" href="../paper-styles/default-theme.html"> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 #checkbox { | 118 #checkbox { |
| 119 position: relative; | 119 position: relative; |
| 120 box-sizing: border-box; | 120 box-sizing: border-box; |
| 121 height: 100%; | 121 height: 100%; |
| 122 border: solid 2px; | 122 border: solid 2px; |
| 123 border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-c
olor)); | 123 border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-c
olor)); |
| 124 border-radius: 2px; | 124 border-radius: 2px; |
| 125 pointer-events: none; | 125 pointer-events: none; |
| 126 -webkit-transition: background-color 140ms, border-color 140ms; | |
| 127 transition: background-color 140ms, border-color 140ms; | 126 transition: background-color 140ms, border-color 140ms; |
| 128 } | 127 } |
| 129 | 128 |
| 130 /* checkbox checked animations */ | 129 /* checkbox checked animations */ |
| 131 #checkbox.checked #checkmark { | 130 #checkbox.checked #checkmark { |
| 132 -webkit-animation: checkmark-expand 140ms ease-out forwards; | |
| 133 animation: checkmark-expand 140ms ease-out forwards; | 131 animation: checkmark-expand 140ms ease-out forwards; |
| 134 } | 132 } |
| 135 | 133 |
| 136 @-webkit-keyframes checkmark-expand { | |
| 137 0% { | |
| 138 -webkit-transform: scale(0, 0) rotate(45deg); | |
| 139 } | |
| 140 100% { | |
| 141 -webkit-transform: scale(1, 1) rotate(45deg); | |
| 142 } | |
| 143 } | |
| 144 | 134 |
| 145 @keyframes checkmark-expand { | 135 @keyframes checkmark-expand { |
| 146 0% { | 136 0% { |
| 147 transform: scale(0, 0) rotate(45deg); | 137 transform: scale(0, 0) rotate(45deg); |
| 148 } | 138 } |
| 149 100% { | 139 100% { |
| 150 transform: scale(1, 1) rotate(45deg); | 140 transform: scale(1, 1) rotate(45deg); |
| 151 } | 141 } |
| 152 } | 142 } |
| 153 | 143 |
| 154 #checkbox.checked { | 144 #checkbox.checked { |
| 155 background-color: var(--paper-checkbox-checked-color, var(--primary-colo
r)); | 145 background-color: var(--paper-checkbox-checked-color, var(--primary-colo
r)); |
| 156 border-color: var(--paper-checkbox-checked-color, var(--primary-color)); | 146 border-color: var(--paper-checkbox-checked-color, var(--primary-color)); |
| 157 } | 147 } |
| 158 | 148 |
| 159 #checkmark { | 149 #checkmark { |
| 160 position: absolute; | 150 position: absolute; |
| 161 width: 36%; | 151 width: 36%; |
| 162 height: 70%; | 152 height: 70%; |
| 163 border-style: solid; | 153 border-style: solid; |
| 164 border-top: none; | 154 border-top: none; |
| 165 border-left: none; | 155 border-left: none; |
| 166 border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size)); | 156 border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size)); |
| 167 border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size)); | 157 border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size)); |
| 168 border-color: var(--paper-checkbox-checkmark-color, white); | 158 border-color: var(--paper-checkbox-checkmark-color, white); |
| 169 -webkit-transform-origin: 97% 86%; | |
| 170 transform-origin: 97% 86%; | 159 transform-origin: 97% 86%; |
| 171 box-sizing: content-box; /* protect against page-level box-sizing */ | 160 box-sizing: content-box; /* protect against page-level box-sizing */ |
| 172 } | 161 } |
| 173 | 162 |
| 174 :host-context([dir="rtl"]) #checkmark { | 163 :host-context([dir="rtl"]) #checkmark { |
| 175 -webkit-transform-origin: 50% 14%; | |
| 176 transform-origin: 50% 14%; | 164 transform-origin: 50% 14%; |
| 177 } | 165 } |
| 178 | 166 |
| 179 /* label */ | 167 /* label */ |
| 180 #checkboxLabel { | 168 #checkboxLabel { |
| 181 position: relative; | 169 position: relative; |
| 182 display: inline-block; | 170 display: inline-block; |
| 183 vertical-align: middle; | 171 vertical-align: middle; |
| 184 padding-left: var(--paper-checkbox-label-spacing, 8px); | 172 padding-left: var(--paper-checkbox-label-spacing, 8px); |
| 185 white-space: normal; | 173 white-space: normal; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 <div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]"> | 216 <div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]"> |
| 229 <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div> | 217 <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div> |
| 230 </div> | 218 </div> |
| 231 </div> | 219 </div> |
| 232 | 220 |
| 233 <div id="checkboxLabel"><content></content></div> | 221 <div id="checkboxLabel"><content></content></div> |
| 234 </template> | 222 </template> |
| 235 | 223 |
| 236 </dom-module> | 224 </dom-module> |
| 237 <script src="paper-checkbox-extracted.js"></script></body></html> | 225 <script src="paper-checkbox-extracted.js"></script></body></html> |
| OLD | NEW |