| 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.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 --> | 9 --> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 height: 100%; | 42 height: 100%; |
| 43 | 43 |
| 44 /* The spinner does not have any contents that would have to be | 44 /* The spinner does not have any contents that would have to be |
| 45 * flipped if the direction changes. Always use ltr so that the | 45 * flipped if the direction changes. Always use ltr so that the |
| 46 * style works out correctly in both cases. */ | 46 * style works out correctly in both cases. */ |
| 47 direction: ltr; | 47 direction: ltr; |
| 48 } | 48 } |
| 49 | 49 |
| 50 #spinnerContainer.active { | 50 #spinnerContainer.active { |
| 51 /* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */ | 51 /* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */ |
| 52 -webkit-animation: container-rotate 1568ms linear infinite; | |
| 53 animation: container-rotate 1568ms linear infinite; | 52 animation: container-rotate 1568ms linear infinite; |
| 54 } | 53 } |
| 55 | 54 |
| 56 @-webkit-keyframes container-rotate { | |
| 57 to { -webkit-transform: rotate(360deg) } | |
| 58 } | |
| 59 | 55 |
| 60 @keyframes container-rotate { | 56 @keyframes container-rotate { |
| 61 to { transform: rotate(360deg) } | 57 to { transform: rotate(360deg) } |
| 62 } | 58 } |
| 63 | 59 |
| 64 .spinner-layer { | 60 .spinner-layer { |
| 65 position: absolute; | 61 position: absolute; |
| 66 width: 100%; | 62 width: 100%; |
| 67 height: 100%; | 63 height: 100%; |
| 68 opacity: 0; | 64 opacity: 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 89 /** | 85 /** |
| 90 * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): | 86 * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): |
| 91 * | 87 * |
| 92 * iOS Safari (tested on iOS 8.1) does not handle animation-delay very wel
l - it doesn't | 88 * iOS Safari (tested on iOS 8.1) does not handle animation-delay very wel
l - it doesn't |
| 93 * guarantee that the animation will start _exactly_ after that value. So
we avoid using | 89 * guarantee that the animation will start _exactly_ after that value. So
we avoid using |
| 94 * animation-delay and instead set custom keyframes for each color (as lay
er-2undant as it | 90 * animation-delay and instead set custom keyframes for each color (as lay
er-2undant as it |
| 95 * seems). | 91 * seems). |
| 96 * | 92 * |
| 97 * We write out each animation in full (instead of separating animation-na
me, | 93 * We write out each animation in full (instead of separating animation-na
me, |
| 98 * animation-duration, etc.) because under the polyfill, Safari does not r
ecognize those | 94 * animation-duration, etc.) because under the polyfill, Safari does not r
ecognize those |
| 99 * specific properties properly, treats them as -webkit-animation, and ove
rrides the | |
| 100 * other animation rules. See https://github.com/Polymer/platform/issues/5
3. | 95 * other animation rules. See https://github.com/Polymer/platform/issues/5
3. |
| 101 */ | 96 */ |
| 102 .active .spinner-layer { | 97 .active .spinner-layer { |
| 103 /* durations: 4 * ARCTIME */ | 98 /* durations: 4 * ARCTIME */ |
| 104 -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2,
1) infinite both; | |
| 105 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both; | 99 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both; |
| 106 opacity: 1; | 100 opacity: 1; |
| 107 } | 101 } |
| 108 | 102 |
| 109 .active .spinner-layer.layer-1 { | 103 .active .spinner-layer.layer-1 { |
| 110 /* durations: 4 * ARCTIME */ | 104 /* durations: 4 * ARCTIME */ |
| 111 -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2,
1) infinite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) inf
inite both; | |
| 112 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; | 105 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; |
| 113 } | 106 } |
| 114 | 107 |
| 115 .active .spinner-layer.layer-2 { | 108 .active .spinner-layer.layer-2 { |
| 116 /* durations: 4 * ARCTIME */ | 109 /* durations: 4 * ARCTIME */ |
| 117 -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2,
1) infinite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) inf
inite both; | |
| 118 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; | 110 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; |
| 119 } | 111 } |
| 120 | 112 |
| 121 .active .spinner-layer.layer-3 { | 113 .active .spinner-layer.layer-3 { |
| 122 /* durations: 4 * ARCTIME */ | 114 /* durations: 4 * ARCTIME */ |
| 123 -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2,
1) infinite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) inf
inite both; | |
| 124 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; | 115 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; |
| 125 } | 116 } |
| 126 | 117 |
| 127 .active .spinner-layer.layer-4 { | 118 .active .spinner-layer.layer-4 { |
| 128 /* durations: 4 * ARCTIME */ | 119 /* durations: 4 * ARCTIME */ |
| 129 -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2,
1) infinite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) inf
inite both; | |
| 130 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; | 120 animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bo
th; |
| 131 } | 121 } |
| 132 | 122 |
| 133 @-webkit-keyframes fill-unfill-rotate { | |
| 134 12.5% { -webkit-transform: rotate(135deg); } /* 0.5 * ARCSIZE */ | |
| 135 25% { -webkit-transform: rotate(270deg); } /* 1 * ARCSIZE */ | |
| 136 37.5% { -webkit-transform: rotate(405deg); } /* 1.5 * ARCSIZE */ | |
| 137 50% { -webkit-transform: rotate(540deg); } /* 2 * ARCSIZE */ | |
| 138 62.5% { -webkit-transform: rotate(675deg); } /* 2.5 * ARCSIZE */ | |
| 139 75% { -webkit-transform: rotate(810deg); } /* 3 * ARCSIZE */ | |
| 140 87.5% { -webkit-transform: rotate(945deg); } /* 3.5 * ARCSIZE */ | |
| 141 to { -webkit-transform: rotate(1080deg); } /* 4 * ARCSIZE */ | |
| 142 } | |
| 143 | 123 |
| 144 @keyframes fill-unfill-rotate { | 124 @keyframes fill-unfill-rotate { |
| 145 12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */ | 125 12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */ |
| 146 25% { transform: rotate(270deg); } /* 1 * ARCSIZE */ | 126 25% { transform: rotate(270deg); } /* 1 * ARCSIZE */ |
| 147 37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */ | 127 37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */ |
| 148 50% { transform: rotate(540deg); } /* 2 * ARCSIZE */ | 128 50% { transform: rotate(540deg); } /* 2 * ARCSIZE */ |
| 149 62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */ | 129 62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */ |
| 150 75% { transform: rotate(810deg); } /* 3 * ARCSIZE */ | 130 75% { transform: rotate(810deg); } /* 3 * ARCSIZE */ |
| 151 87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */ | 131 87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */ |
| 152 to { transform: rotate(1080deg); } /* 4 * ARCSIZE */ | 132 to { transform: rotate(1080deg); } /* 4 * ARCSIZE */ |
| 153 } | 133 } |
| 154 | 134 |
| 155 /** | 135 /** |
| 156 * HACK: Even though the intention is to have the current .spinner-layer a
t | 136 * HACK: Even though the intention is to have the current .spinner-layer a
t |
| 157 * `opacity: 1`, we set it to `opacity: 0.99` instead since this forces Ch
rome | 137 * `opacity: 1`, we set it to `opacity: 0.99` instead since this forces Ch
rome |
| 158 * to do proper subpixel rendering for the elements being animated. This i
s | 138 * to do proper subpixel rendering for the elements being animated. This i
s |
| 159 * especially visible in Chrome 39 on Ubuntu 14.04. See: | 139 * especially visible in Chrome 39 on Ubuntu 14.04. See: |
| 160 * | 140 * |
| 161 * - https://github.com/Polymer/paper-spinner/issues/9 | 141 * - https://github.com/Polymer/paper-spinner/issues/9 |
| 162 * - https://code.google.com/p/chromium/issues/detail?id=436255 | 142 * - https://code.google.com/p/chromium/issues/detail?id=436255 |
| 163 */ | 143 */ |
| 164 @-webkit-keyframes layer-1-fade-in-out { | |
| 165 from { opacity: 0.99; } | |
| 166 25% { opacity: 0.99; } | |
| 167 26% { opacity: 0; } | |
| 168 89% { opacity: 0; } | |
| 169 90% { opacity: 0.99; } | |
| 170 100% { opacity: 0.99; } | |
| 171 } | |
| 172 | 144 |
| 173 @keyframes layer-1-fade-in-out { | 145 @keyframes layer-1-fade-in-out { |
| 174 from { opacity: 0.99; } | 146 from { opacity: 0.99; } |
| 175 25% { opacity: 0.99; } | 147 25% { opacity: 0.99; } |
| 176 26% { opacity: 0; } | 148 26% { opacity: 0; } |
| 177 89% { opacity: 0; } | 149 89% { opacity: 0; } |
| 178 90% { opacity: 0.99; } | 150 90% { opacity: 0.99; } |
| 179 100% { opacity: 0.99; } | 151 100% { opacity: 0.99; } |
| 180 } | 152 } |
| 181 | 153 |
| 182 @-webkit-keyframes layer-2-fade-in-out { | |
| 183 from { opacity: 0; } | |
| 184 15% { opacity: 0; } | |
| 185 25% { opacity: 0.99; } | |
| 186 50% { opacity: 0.99; } | |
| 187 51% { opacity: 0; } | |
| 188 } | |
| 189 | 154 |
| 190 @keyframes layer-2-fade-in-out { | 155 @keyframes layer-2-fade-in-out { |
| 191 from { opacity: 0; } | 156 from { opacity: 0; } |
| 192 15% { opacity: 0; } | 157 15% { opacity: 0; } |
| 193 25% { opacity: 0.99; } | 158 25% { opacity: 0.99; } |
| 194 50% { opacity: 0.99; } | 159 50% { opacity: 0.99; } |
| 195 51% { opacity: 0; } | 160 51% { opacity: 0; } |
| 196 } | 161 } |
| 197 | 162 |
| 198 @-webkit-keyframes layer-3-fade-in-out { | |
| 199 from { opacity: 0; } | |
| 200 40% { opacity: 0; } | |
| 201 50% { opacity: 0.99; } | |
| 202 75% { opacity: 0.99; } | |
| 203 76% { opacity: 0; } | |
| 204 } | |
| 205 | 163 |
| 206 @keyframes layer-3-fade-in-out { | 164 @keyframes layer-3-fade-in-out { |
| 207 from { opacity: 0; } | 165 from { opacity: 0; } |
| 208 40% { opacity: 0; } | 166 40% { opacity: 0; } |
| 209 50% { opacity: 0.99; } | 167 50% { opacity: 0.99; } |
| 210 75% { opacity: 0.99; } | 168 75% { opacity: 0.99; } |
| 211 76% { opacity: 0; } | 169 76% { opacity: 0; } |
| 212 } | 170 } |
| 213 | 171 |
| 214 @-webkit-keyframes layer-4-fade-in-out { | |
| 215 from { opacity: 0; } | |
| 216 65% { opacity: 0; } | |
| 217 75% { opacity: 0.99; } | |
| 218 90% { opacity: 0.99; } | |
| 219 100% { opacity: 0; } | |
| 220 } | |
| 221 | 172 |
| 222 @keyframes layer-4-fade-in-out { | 173 @keyframes layer-4-fade-in-out { |
| 223 from { opacity: 0; } | 174 from { opacity: 0; } |
| 224 65% { opacity: 0; } | 175 65% { opacity: 0; } |
| 225 75% { opacity: 0.99; } | 176 75% { opacity: 0.99; } |
| 226 90% { opacity: 0.99; } | 177 90% { opacity: 0.99; } |
| 227 100% { opacity: 0; } | 178 100% { opacity: 0; } |
| 228 } | 179 } |
| 229 | 180 |
| 230 /** | 181 /** |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 215 } |
| 265 | 216 |
| 266 .circle { | 217 .circle { |
| 267 box-sizing: border-box; | 218 box-sizing: border-box; |
| 268 height: 100%; | 219 height: 100%; |
| 269 border-width: 3px; /* STROKEWIDTH */ | 220 border-width: 3px; /* STROKEWIDTH */ |
| 270 border-style: solid; | 221 border-style: solid; |
| 271 border-color: inherit; | 222 border-color: inherit; |
| 272 border-bottom-color: transparent !important; | 223 border-bottom-color: transparent !important; |
| 273 border-radius: 50%; | 224 border-radius: 50%; |
| 274 -webkit-animation: none; | |
| 275 animation: none; | 225 animation: none; |
| 276 | 226 |
| 277 @apply(--layout-fit); | 227 @apply(--layout-fit); |
| 278 } | 228 } |
| 279 | 229 |
| 280 .circle-clipper.left .circle { | 230 .circle-clipper.left .circle { |
| 281 border-right-color: transparent !important; | 231 border-right-color: transparent !important; |
| 282 -webkit-transform: rotate(129deg); | |
| 283 transform: rotate(129deg); | 232 transform: rotate(129deg); |
| 284 } | 233 } |
| 285 | 234 |
| 286 .circle-clipper.right .circle { | 235 .circle-clipper.right .circle { |
| 287 left: -100%; | 236 left: -100%; |
| 288 border-left-color: transparent !important; | 237 border-left-color: transparent !important; |
| 289 -webkit-transform: rotate(-129deg); | |
| 290 transform: rotate(-129deg); | 238 transform: rotate(-129deg); |
| 291 } | 239 } |
| 292 | 240 |
| 293 .active .circle-clipper.left .circle { | 241 .active .circle-clipper.left .circle { |
| 294 /* duration: ARCTIME */ | 242 /* duration: ARCTIME */ |
| 295 -webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infin
ite both; | |
| 296 animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both
; | 243 animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both
; |
| 297 } | 244 } |
| 298 | 245 |
| 299 .active .circle-clipper.right .circle { | 246 .active .circle-clipper.right .circle { |
| 300 /* duration: ARCTIME */ | 247 /* duration: ARCTIME */ |
| 301 -webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infi
nite both; | |
| 302 animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bot
h; | 248 animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite bot
h; |
| 303 } | 249 } |
| 304 | 250 |
| 305 @-webkit-keyframes left-spin { | |
| 306 from { -webkit-transform: rotate(130deg); } | |
| 307 50% { -webkit-transform: rotate(-5deg); } | |
| 308 to { -webkit-transform: rotate(130deg); } | |
| 309 } | |
| 310 | 251 |
| 311 @keyframes left-spin { | 252 @keyframes left-spin { |
| 312 from { transform: rotate(130deg); } | 253 from { transform: rotate(130deg); } |
| 313 50% { transform: rotate(-5deg); } | 254 50% { transform: rotate(-5deg); } |
| 314 to { transform: rotate(130deg); } | 255 to { transform: rotate(130deg); } |
| 315 } | 256 } |
| 316 | 257 |
| 317 @-webkit-keyframes right-spin { | |
| 318 from { -webkit-transform: rotate(-130deg); } | |
| 319 50% { -webkit-transform: rotate(5deg); } | |
| 320 to { -webkit-transform: rotate(-130deg); } | |
| 321 } | |
| 322 | 258 |
| 323 @keyframes right-spin { | 259 @keyframes right-spin { |
| 324 from { transform: rotate(-130deg); } | 260 from { transform: rotate(-130deg); } |
| 325 50% { transform: rotate(5deg); } | 261 50% { transform: rotate(5deg); } |
| 326 to { transform: rotate(-130deg); } | 262 to { transform: rotate(-130deg); } |
| 327 } | 263 } |
| 328 | 264 |
| 329 #spinnerContainer.cooldown { | 265 #spinnerContainer.cooldown { |
| 330 /* duration: SHRINK_TIME */ | 266 /* duration: SHRINK_TIME */ |
| 331 -webkit-animation: container-rotate 1568ms linear infinite, fade-out 400
ms cubic-bezier(0.4, 0.0, 0.2, 1); | |
| 332 animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic
-bezier(0.4, 0.0, 0.2, 1); | 267 animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic
-bezier(0.4, 0.0, 0.2, 1); |
| 333 } | 268 } |
| 334 | 269 |
| 335 @-webkit-keyframes fade-out { | |
| 336 from { opacity: 0.99; } | |
| 337 to { opacity: 0; } | |
| 338 } | |
| 339 | 270 |
| 340 @keyframes fade-out { | 271 @keyframes fade-out { |
| 341 from { opacity: 0.99; } | 272 from { opacity: 0.99; } |
| 342 to { opacity: 0; } | 273 to { opacity: 0; } |
| 343 } | 274 } |
| 344 </style> | 275 </style> |
| 345 </template> | 276 </template> |
| 346 </dom-module> | 277 </dom-module> |
| OLD | NEW |