| 1 |
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */ |
| 2 |
/* |
| 3 |
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions) |
| 4 |
*/ |
| 5 |
/* pswp = photoswipe */ |
| 6 |
.pswp { |
| 7 |
display: none; |
| 8 |
position: absolute; |
| 9 |
width: 100%; |
| 10 |
height: 100%; |
| 11 |
left: 0; |
| 12 |
top: 0; |
| 13 |
overflow: hidden; |
| 14 |
-ms-touch-action: none; |
| 15 |
touch-action: none; |
| 16 |
z-index: 1500; |
| 17 |
-webkit-text-size-adjust: 100%; |
| 18 |
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */ |
| 19 |
-webkit-backface-visibility: hidden; |
| 20 |
outline: none; |
| 21 |
} |
| 22 |
|
| 23 |
.pswp * { |
| 24 |
-webkit-box-sizing: border-box; |
| 25 |
box-sizing: border-box; |
| 26 |
} |
| 27 |
|
| 28 |
.pswp img { |
| 29 |
max-width: none; |
| 30 |
} |
| 31 |
|
| 32 |
/* style is added when JS option showHideOpacity is set to true */ |
| 33 |
.pswp--animate_opacity { |
| 34 |
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */ |
| 35 |
opacity: 0.001; |
| 36 |
will-change: opacity; |
| 37 |
/* for open/close transition */ |
| 38 |
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 39 |
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 40 |
} |
| 41 |
|
| 42 |
.pswp--open { |
| 43 |
display: block; |
| 44 |
} |
| 45 |
|
| 46 |
.pswp--zoom-allowed .pswp__img { |
| 47 |
/* autoprefixer: off */ |
| 48 |
cursor: -webkit-zoom-in; |
| 49 |
cursor: -moz-zoom-in; |
| 50 |
cursor: zoom-in; |
| 51 |
} |
| 52 |
|
| 53 |
.pswp--zoomed-in .pswp__img { |
| 54 |
/* autoprefixer: off */ |
| 55 |
cursor: -webkit-grab; |
| 56 |
cursor: -moz-grab; |
| 57 |
cursor: grab; |
| 58 |
} |
| 59 |
|
| 60 |
.pswp--dragging .pswp__img { |
| 61 |
/* autoprefixer: off */ |
| 62 |
cursor: -webkit-grabbing; |
| 63 |
cursor: -moz-grabbing; |
| 64 |
cursor: grabbing; |
| 65 |
} |
| 66 |
|
| 67 |
/* |
| 68 |
Background is added as a separate element. |
| 69 |
As animating opacity is much faster than animating rgba() background-color. |
| 70 |
*/ |
| 71 |
.pswp__bg { |
| 72 |
position: absolute; |
| 73 |
left: 0; |
| 74 |
top: 0; |
| 75 |
width: 100%; |
| 76 |
height: 100%; |
| 77 |
background: #000; |
| 78 |
opacity: 0; |
| 79 |
-webkit-transform: translateZ(0); |
| 80 |
transform: translateZ(0); |
| 81 |
-webkit-backface-visibility: hidden; |
| 82 |
will-change: opacity; |
| 83 |
} |
| 84 |
|
| 85 |
.pswp__scroll-wrap { |
| 86 |
position: absolute; |
| 87 |
left: 0; |
| 88 |
top: 0; |
| 89 |
width: 100%; |
| 90 |
height: 100%; |
| 91 |
overflow: hidden; |
| 92 |
} |
| 93 |
|
| 94 |
.pswp__container, |
| 95 |
.pswp__zoom-wrap { |
| 96 |
-ms-touch-action: none; |
| 97 |
touch-action: none; |
| 98 |
position: absolute; |
| 99 |
left: 0; |
| 100 |
right: 0; |
| 101 |
top: 0; |
| 102 |
bottom: 0; |
| 103 |
} |
| 104 |
|
| 105 |
/* Prevent selection and tap highlights */ |
| 106 |
.pswp__container, |
| 107 |
.pswp__img { |
| 108 |
-webkit-user-select: none; |
| 109 |
-moz-user-select: none; |
| 110 |
-ms-user-select: none; |
| 111 |
user-select: none; |
| 112 |
-webkit-tap-highlight-color: transparent; |
| 113 |
-webkit-touch-callout: none; |
| 114 |
} |
| 115 |
|
| 116 |
.pswp__zoom-wrap { |
| 117 |
position: absolute; |
| 118 |
width: 100%; |
| 119 |
-webkit-transform-origin: left top; |
| 120 |
-ms-transform-origin: left top; |
| 121 |
transform-origin: left top; |
| 122 |
/* for open/close transition */ |
| 123 |
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 124 |
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 125 |
} |
| 126 |
|
| 127 |
.pswp__bg { |
| 128 |
will-change: opacity; |
| 129 |
/* for open/close transition */ |
| 130 |
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 131 |
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 132 |
} |
| 133 |
|
| 134 |
.pswp--animated-in .pswp__bg, |
| 135 |
.pswp--animated-in .pswp__zoom-wrap { |
| 136 |
-webkit-transition: none; |
| 137 |
transition: none; |
| 138 |
} |
| 139 |
|
| 140 |
.pswp__container, |
| 141 |
.pswp__zoom-wrap { |
| 142 |
-webkit-backface-visibility: hidden; |
| 143 |
} |
| 144 |
|
| 145 |
.pswp__item { |
| 146 |
position: absolute; |
| 147 |
left: 0; |
| 148 |
right: 0; |
| 149 |
top: 0; |
| 150 |
bottom: 0; |
| 151 |
overflow: hidden; |
| 152 |
} |
| 153 |
|
| 154 |
.pswp__img { |
| 155 |
position: absolute; |
| 156 |
width: auto; |
| 157 |
height: auto; |
| 158 |
top: 0; |
| 159 |
left: 0; |
| 160 |
} |
| 161 |
|
| 162 |
/* |
| 163 |
stretched thumbnail or div placeholder element (see below) |
| 164 |
style is added to avoid flickering in webkit/blink when layers overlap |
| 165 |
*/ |
| 166 |
.pswp__img--placeholder { |
| 167 |
-webkit-backface-visibility: hidden; |
| 168 |
} |
| 169 |
|
| 170 |
/* |
| 171 |
div element that matches size of large image |
| 172 |
large image loads on top of it |
| 173 |
*/ |
| 174 |
.pswp__img--placeholder--blank { |
| 175 |
background: #222; |
| 176 |
} |
| 177 |
|
| 178 |
.pswp--ie .pswp__img { |
| 179 |
width: 100% !important; |
| 180 |
height: auto !important; |
| 181 |
left: 0; |
| 182 |
top: 0; |
| 183 |
} |
| 184 |
|
| 185 |
/* |
| 186 |
Error message appears when image is not loaded |
| 187 |
(JS option errorMsg controls markup) |
| 188 |
*/ |
| 189 |
.pswp__error-msg { |
| 190 |
position: absolute; |
| 191 |
left: 0; |
| 192 |
top: 50%; |
| 193 |
width: 100%; |
| 194 |
text-align: center; |
| 195 |
font-size: 14px; |
| 196 |
line-height: 16px; |
| 197 |
margin-top: -8px; |
| 198 |
color: #CCC; |
| 199 |
} |
| 200 |
|
| 201 |
.pswp__error-msg a { |
| 202 |
color: #CCC; |
| 203 |
text-decoration: underline; |
| 204 |
} |
| 205 |
|
| 206 |
|
| 207 |
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ |
| 208 |
/* |
| 209 |
|
| 210 |
Contents: |
| 211 |
|
| 212 |
1. Buttons |
| 213 |
2. Share modal and links |
| 214 |
3. Index indicator ("1 of X" counter) |
| 215 |
4. Caption |
| 216 |
5. Loading indicator |
| 217 |
6. Additional styles (root element, top bar, idle state, hidden state, etc.) |
| 218 |
|
| 219 |
*/ |
| 220 |
/* |
| 221 |
|
| 222 |
1. Buttons |
| 223 |
|
| 224 |
*/ |
| 225 |
/* <button> css reset */ |
| 226 |
.pswp__button { |
| 227 |
width: 44px; |
| 228 |
height: 44px; |
| 229 |
position: relative; |
| 230 |
background: none; |
| 231 |
cursor: pointer; |
| 232 |
overflow: visible; |
| 233 |
-webkit-appearance: none; |
| 234 |
display: block; |
| 235 |
border: 0; |
| 236 |
padding: 0; |
| 237 |
margin: 0; |
| 238 |
float: right; |
| 239 |
opacity: 0.75; |
| 240 |
-webkit-transition: opacity 0.2s; |
| 241 |
transition: opacity 0.2s; |
| 242 |
-webkit-box-shadow: none; |
| 243 |
box-shadow: none; |
| 244 |
} |
| 245 |
|
| 246 |
.pswp__button:focus, .pswp__button:hover { |
| 247 |
opacity: 1; |
| 248 |
background-color: transparent; |
| 249 |
color: #fff; |
| 250 |
background-image: url(photoswipe-img/default-skin.png); |
| 251 |
} |
| 252 |
|
| 253 |
.pswp__button:active { |
| 254 |
outline: none; |
| 255 |
opacity: 0.9; |
| 256 |
} |
| 257 |
|
| 258 |
.pswp__button::-moz-focus-inner { |
| 259 |
padding: 0; |
| 260 |
border: 0; |
| 261 |
} |
| 262 |
|
| 263 |
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */ |
| 264 |
.pswp__ui--over-close .pswp__button--close { |
| 265 |
opacity: 1; |
| 266 |
} |
| 267 |
|
| 268 |
.pswp__button, |
| 269 |
.pswp__button--arrow--left:before, |
| 270 |
.pswp__button--arrow--right:before { |
| 271 |
background: url(photoswipe-img/default-skin.png) 0 0 no-repeat; |
| 272 |
background-size: 264px 88px; |
| 273 |
width: 44px; |
| 274 |
height: 44px; |
| 275 |
} |
| 276 |
|
| 277 |
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) { |
| 278 |
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */ |
| 279 |
.pswp--svg .pswp__button, |
| 280 |
.pswp--svg .pswp__button--arrow--left:before, |
| 281 |
.pswp--svg .pswp__button--arrow--right:before { |
| 282 |
background-image: url(photoswipe-img/default-skin.svg); |
| 283 |
} |
| 284 |
|
| 285 |
.pswp--svg .pswp__button--arrow--left, |
| 286 |
.pswp--svg .pswp__button--arrow--right { |
| 287 |
background: none; |
| 288 |
} |
| 289 |
} |
| 290 |
|
| 291 |
.pswp__button--close, .pswp__button--close:focus, .pswp__button--close:hover { |
| 292 |
background-position: 0 -44px; |
| 293 |
} |
| 294 |
|
| 295 |
.pswp__button--share, .pswp__button--share:focus, .pswp__button--share:hover { |
| 296 |
background-position: -44px -44px; |
| 297 |
} |
| 298 |
|
| 299 |
.pswp__button--fs { |
| 300 |
display: none; |
| 301 |
} |
| 302 |
|
| 303 |
.pswp--supports-fs .pswp__button--fs { |
| 304 |
display: block; |
| 305 |
} |
| 306 |
|
| 307 |
.pswp--fs .pswp__button--fs, .pswp--fs .pswp__button--fs:focus, .pswp--fs .pswp__button--fs:hover { |
| 308 |
background-position: -44px 0; |
| 309 |
} |
| 310 |
|
| 311 |
.pswp__button--zoom, .pswp__button--zoom:focus, .pswp__button--zoom:hover { |
| 312 |
display: none; |
| 313 |
background-position: -88px 0; |
| 314 |
} |
| 315 |
|
| 316 |
.pswp--zoom-allowed .pswp__button--zoom, .pswp--zoom-allowed .pswp__button--zoom:focus, .pswp--zoom-allowed .pswp__button--zoom:hover { |
| 317 |
display: block; |
| 318 |
} |
| 319 |
|
| 320 |
.pswp--zoomed-in .pswp__button--zoom, .pswp--zoomed-in .pswp__button--zoom:focus, .pswp--zoomed-in .pswp__button--zoom:hover { |
| 321 |
background-position: -132px 0; |
| 322 |
} |
| 323 |
|
| 324 |
/* no arrows on touch screens */ |
| 325 |
.pswp--touch .pswp__button--arrow--left, |
| 326 |
.pswp--touch .pswp__button--arrow--right { |
| 327 |
visibility: hidden; |
| 328 |
} |
| 329 |
|
| 330 |
/* |
| 331 |
Arrow buttons hit area |
| 332 |
(icon is added to :before pseudo-element) |
| 333 |
*/ |
| 334 |
.pswp__button--arrow--left, .pswp__button--arrow--left:focus, .pswp__button--arrow--left:hover, |
| 335 |
.pswp__button--arrow--right, .pswp__button--arrow--right:focus, .pswp__button--arrow--right:hover { |
| 336 |
background: none; |
| 337 |
top: 50%; |
| 338 |
margin-top: -50px; |
| 339 |
width: 70px; |
| 340 |
height: 100px; |
| 341 |
position: absolute; |
| 342 |
} |
| 343 |
|
| 344 |
.pswp__button--arrow--left { |
| 345 |
left: 0; |
| 346 |
} |
| 347 |
|
| 348 |
.pswp__button--arrow--right { |
| 349 |
right: 0; |
| 350 |
} |
| 351 |
|
| 352 |
.pswp__button--arrow--left:before, |
| 353 |
.pswp__button--arrow--right:before { |
| 354 |
content: ''; |
| 355 |
top: 35px; |
| 356 |
background-color: rgba(0, 0, 0, 0.3); |
| 357 |
height: 30px; |
| 358 |
width: 32px; |
| 359 |
position: absolute; |
| 360 |
} |
| 361 |
|
| 362 |
.pswp__button--arrow--left:before { |
| 363 |
left: 6px; |
| 364 |
background-position: -138px -44px; |
| 365 |
} |
| 366 |
|
| 367 |
.pswp__button--arrow--right:before { |
| 368 |
right: 6px; |
| 369 |
background-position: -94px -44px; |
| 370 |
} |
| 371 |
|
| 372 |
/* |
| 373 |
|
| 374 |
2. Share modal/popup and links |
| 375 |
|
| 376 |
*/ |
| 377 |
.pswp__counter, |
| 378 |
.pswp__share-modal { |
| 379 |
-webkit-user-select: none; |
| 380 |
-moz-user-select: none; |
| 381 |
-ms-user-select: none; |
| 382 |
user-select: none; |
| 383 |
} |
| 384 |
|
| 385 |
.pswp__share-modal { |
| 386 |
display: block; |
| 387 |
background: rgba(0, 0, 0, 0.5); |
| 388 |
width: 100%; |
| 389 |
height: 100%; |
| 390 |
top: 0; |
| 391 |
left: 0; |
| 392 |
padding: 10px; |
| 393 |
position: absolute; |
| 394 |
z-index: 1600; |
| 395 |
opacity: 0; |
| 396 |
-webkit-transition: opacity 0.25s ease-out; |
| 397 |
transition: opacity 0.25s ease-out; |
| 398 |
-webkit-backface-visibility: hidden; |
| 399 |
will-change: opacity; |
| 400 |
} |
| 401 |
|
| 402 |
.pswp__share-modal--hidden { |
| 403 |
display: none; |
| 404 |
} |
| 405 |
|
| 406 |
.pswp__share-tooltip { |
| 407 |
z-index: 1620; |
| 408 |
position: absolute; |
| 409 |
background: #FFF; |
| 410 |
top: 56px; |
| 411 |
border-radius: 2px; |
| 412 |
display: block; |
| 413 |
width: auto; |
| 414 |
right: 44px; |
| 415 |
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); |
| 416 |
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); |
| 417 |
-webkit-transform: translateY(6px); |
| 418 |
-ms-transform: translateY(6px); |
| 419 |
transform: translateY(6px); |
| 420 |
-webkit-transition: -webkit-transform 0.25s; |
| 421 |
transition: transform 0.25s; |
| 422 |
-webkit-backface-visibility: hidden; |
| 423 |
will-change: transform; |
| 424 |
} |
| 425 |
|
| 426 |
.pswp__share-tooltip a { |
| 427 |
display: block; |
| 428 |
padding: 8px 12px; |
| 429 |
color: #000; |
| 430 |
text-decoration: none; |
| 431 |
font-size: 14px; |
| 432 |
line-height: 18px; |
| 433 |
} |
| 434 |
|
| 435 |
.pswp__share-tooltip a:hover { |
| 436 |
text-decoration: none; |
| 437 |
color: #000; |
| 438 |
} |
| 439 |
|
| 440 |
.pswp__share-tooltip a:first-child { |
| 441 |
/* round corners on the first/last list item */ |
| 442 |
border-radius: 2px 2px 0 0; |
| 443 |
} |
| 444 |
|
| 445 |
.pswp__share-tooltip a:last-child { |
| 446 |
border-radius: 0 0 2px 2px; |
| 447 |
} |
| 448 |
|
| 449 |
.pswp__share-modal--fade-in { |
| 450 |
opacity: 1; |
| 451 |
} |
| 452 |
|
| 453 |
.pswp__share-modal--fade-in .pswp__share-tooltip { |
| 454 |
-webkit-transform: translateY(0); |
| 455 |
-ms-transform: translateY(0); |
| 456 |
transform: translateY(0); |
| 457 |
} |
| 458 |
|
| 459 |
/* increase size of share links on touch devices */ |
| 460 |
.pswp--touch .pswp__share-tooltip a { |
| 461 |
padding: 16px 12px; |
| 462 |
} |
| 463 |
|
| 464 |
a.pswp__share--facebook:before { |
| 465 |
content: ''; |
| 466 |
display: block; |
| 467 |
width: 0; |
| 468 |
height: 0; |
| 469 |
position: absolute; |
| 470 |
top: -12px; |
| 471 |
right: 15px; |
| 472 |
border: 6px solid transparent; |
| 473 |
border-bottom-color: #FFF; |
| 474 |
-webkit-pointer-events: none; |
| 475 |
-moz-pointer-events: none; |
| 476 |
pointer-events: none; |
| 477 |
} |
| 478 |
|
| 479 |
a.pswp__share--facebook:hover { |
| 480 |
background: #3E5C9A; |
| 481 |
color: #FFF; |
| 482 |
} |
| 483 |
|
| 484 |
a.pswp__share--facebook:hover:before { |
| 485 |
border-bottom-color: #3E5C9A; |
| 486 |
} |
| 487 |
|
| 488 |
a.pswp__share--twitter:hover { |
| 489 |
background: #55ACEE; |
| 490 |
color: #FFF; |
| 491 |
} |
| 492 |
|
| 493 |
a.pswp__share--googleplus:hover { |
| 494 |
background: #c66; |
| 495 |
color: #FFF; |
| 496 |
} |
| 497 |
|
| 498 |
a.pswp__share--pinterest:hover { |
| 499 |
background: #CCC; |
| 500 |
color: #CE272D; |
| 501 |
} |
| 502 |
|
| 503 |
a.pswp__share--download:hover { |
| 504 |
background: #DDD; |
| 505 |
} |
| 506 |
|
| 507 |
/* |
| 508 |
|
| 509 |
3. Index indicator ("1 of X" counter) |
| 510 |
|
| 511 |
*/ |
| 512 |
.pswp__counter { |
| 513 |
position: absolute; |
| 514 |
left: 0; |
| 515 |
top: 0; |
| 516 |
height: 44px; |
| 517 |
font-size: 13px; |
| 518 |
line-height: 44px; |
| 519 |
color: #FFF; |
| 520 |
opacity: 0.75; |
| 521 |
padding: 0 10px; |
| 522 |
} |
| 523 |
|
| 524 |
/* |
| 525 |
|
| 526 |
4. Caption |
| 527 |
|
| 528 |
*/ |
| 529 |
.pswp__caption { |
| 530 |
position: absolute; |
| 531 |
left: 0; |
| 532 |
bottom: 0; |
| 533 |
width: 100%; |
| 534 |
min-height: 44px; |
| 535 |
} |
| 536 |
|
| 537 |
.pswp__caption small { |
| 538 |
font-size: 11px; |
| 539 |
color: #BBB; |
| 540 |
} |
| 541 |
|
| 542 |
.pswp__caption__center { |
| 543 |
text-align: center; |
| 544 |
max-width: 420px; |
| 545 |
margin: 0 auto; |
| 546 |
font-size: 13px; |
| 547 |
padding: 10px; |
| 548 |
line-height: 20px; |
| 549 |
color: #CCC; |
| 550 |
} |
| 551 |
|
| 552 |
.pswp__caption--empty { |
| 553 |
display: none; |
| 554 |
} |
| 555 |
|
| 556 |
/* Fake caption element, used to calculate height of next/prev image */ |
| 557 |
.pswp__caption--fake { |
| 558 |
visibility: hidden; |
| 559 |
} |
| 560 |
|
| 561 |
/* |
| 562 |
|
| 563 |
5. Loading indicator (preloader) |
| 564 |
|
| 565 |
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR |
| 566 |
|
| 567 |
*/ |
| 568 |
.pswp__preloader { |
| 569 |
width: 44px; |
| 570 |
height: 44px; |
| 571 |
position: absolute; |
| 572 |
top: 0; |
| 573 |
left: 50%; |
| 574 |
margin-left: -22px; |
| 575 |
opacity: 0; |
| 576 |
-webkit-transition: opacity 0.25s ease-out; |
| 577 |
transition: opacity 0.25s ease-out; |
| 578 |
will-change: opacity; |
| 579 |
direction: ltr; |
| 580 |
} |
| 581 |
|
| 582 |
.pswp__preloader__icn { |
| 583 |
width: 20px; |
| 584 |
height: 20px; |
| 585 |
margin: 12px; |
| 586 |
} |
| 587 |
|
| 588 |
.pswp__preloader--active { |
| 589 |
opacity: 1; |
| 590 |
} |
| 591 |
|
| 592 |
.pswp__preloader--active .pswp__preloader__icn { |
| 593 |
/* We use .gif in browsers that don't support CSS animation */ |
| 594 |
background: url(photoswipe-img/preloader.gif) 0 0 no-repeat; |
| 595 |
} |
| 596 |
|
| 597 |
.pswp--css_animation .pswp__preloader--active { |
| 598 |
opacity: 1; |
| 599 |
} |
| 600 |
|
| 601 |
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn { |
| 602 |
-webkit-animation: clockwise 500ms linear infinite; |
| 603 |
animation: clockwise 500ms linear infinite; |
| 604 |
} |
| 605 |
|
| 606 |
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut { |
| 607 |
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; |
| 608 |
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; |
| 609 |
} |
| 610 |
|
| 611 |
.pswp--css_animation .pswp__preloader__icn { |
| 612 |
background: none; |
| 613 |
opacity: 0.75; |
| 614 |
width: 14px; |
| 615 |
height: 14px; |
| 616 |
position: absolute; |
| 617 |
left: 15px; |
| 618 |
top: 15px; |
| 619 |
margin: 0; |
| 620 |
} |
| 621 |
|
| 622 |
.pswp--css_animation .pswp__preloader__cut { |
| 623 |
/* |
| 624 |
The idea of animating inner circle is based on Polymer ("material") loading indicator |
| 625 |
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html |
| 626 |
*/ |
| 627 |
position: relative; |
| 628 |
width: 7px; |
| 629 |
height: 14px; |
| 630 |
overflow: hidden; |
| 631 |
} |
| 632 |
|
| 633 |
.pswp--css_animation .pswp__preloader__donut { |
| 634 |
-webkit-box-sizing: border-box; |
| 635 |
box-sizing: border-box; |
| 636 |
width: 14px; |
| 637 |
height: 14px; |
| 638 |
border: 2px solid #FFF; |
| 639 |
border-radius: 50%; |
| 640 |
border-left-color: transparent; |
| 641 |
border-bottom-color: transparent; |
| 642 |
position: absolute; |
| 643 |
top: 0; |
| 644 |
left: 0; |
| 645 |
background: none; |
| 646 |
margin: 0; |
| 647 |
} |
| 648 |
|
| 649 |
@media screen and (max-width: 1024px) { |
| 650 |
.pswp__preloader { |
| 651 |
position: relative; |
| 652 |
left: auto; |
| 653 |
top: auto; |
| 654 |
margin: 0; |
| 655 |
float: right; |
| 656 |
} |
| 657 |
} |
| 658 |
|
| 659 |
@-webkit-keyframes clockwise { |
| 660 |
0% { |
| 661 |
-webkit-transform: rotate(0deg); |
| 662 |
transform: rotate(0deg); |
| 663 |
} |
| 664 |
100% { |
| 665 |
-webkit-transform: rotate(360deg); |
| 666 |
transform: rotate(360deg); |
| 667 |
} |
| 668 |
} |
| 669 |
|
| 670 |
@keyframes clockwise { |
| 671 |
0% { |
| 672 |
-webkit-transform: rotate(0deg); |
| 673 |
transform: rotate(0deg); |
| 674 |
} |
| 675 |
100% { |
| 676 |
-webkit-transform: rotate(360deg); |
| 677 |
transform: rotate(360deg); |
| 678 |
} |
| 679 |
} |
| 680 |
|
| 681 |
@-webkit-keyframes donut-rotate { |
| 682 |
0% { |
| 683 |
-webkit-transform: rotate(0); |
| 684 |
transform: rotate(0); |
| 685 |
} |
| 686 |
50% { |
| 687 |
-webkit-transform: rotate(-140deg); |
| 688 |
transform: rotate(-140deg); |
| 689 |
} |
| 690 |
100% { |
| 691 |
-webkit-transform: rotate(0); |
| 692 |
transform: rotate(0); |
| 693 |
} |
| 694 |
} |
| 695 |
|
| 696 |
@keyframes donut-rotate { |
| 697 |
0% { |
| 698 |
-webkit-transform: rotate(0); |
| 699 |
transform: rotate(0); |
| 700 |
} |
| 701 |
50% { |
| 702 |
-webkit-transform: rotate(-140deg); |
| 703 |
transform: rotate(-140deg); |
| 704 |
} |
| 705 |
100% { |
| 706 |
-webkit-transform: rotate(0); |
| 707 |
transform: rotate(0); |
| 708 |
} |
| 709 |
} |
| 710 |
|
| 711 |
/* |
| 712 |
|
| 713 |
6. Additional styles |
| 714 |
|
| 715 |
*/ |
| 716 |
/* root element of UI */ |
| 717 |
.pswp__ui { |
| 718 |
-webkit-font-smoothing: antialiased; |
| 719 |
visibility: visible; |
| 720 |
opacity: 1; |
| 721 |
z-index: 1550; |
| 722 |
} |
| 723 |
|
| 724 |
/* top black bar with buttons and "1 of X" indicator */ |
| 725 |
.pswp__top-bar { |
| 726 |
position: absolute; |
| 727 |
left: 0; |
| 728 |
top: 0; |
| 729 |
height: 44px; |
| 730 |
width: 100%; |
| 731 |
} |
| 732 |
|
| 733 |
.pswp__caption, |
| 734 |
.pswp__top-bar, |
| 735 |
.pswp--has_mouse .pswp__button--arrow--left, |
| 736 |
.pswp--has_mouse .pswp__button--arrow--right { |
| 737 |
-webkit-backface-visibility: hidden; |
| 738 |
will-change: opacity; |
| 739 |
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 740 |
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); |
| 741 |
} |
| 742 |
|
| 743 |
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */ |
| 744 |
.pswp--has_mouse .pswp__button--arrow--left, |
| 745 |
.pswp--has_mouse .pswp__button--arrow--right { |
| 746 |
visibility: visible; |
| 747 |
} |
| 748 |
|
| 749 |
.pswp__top-bar, |
| 750 |
.pswp__caption { |
| 751 |
background-color: rgba(0, 0, 0, 0.5); |
| 752 |
} |
| 753 |
|
| 754 |
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */ |
| 755 |
.pswp__ui--fit .pswp__top-bar, |
| 756 |
.pswp__ui--fit .pswp__caption { |
| 757 |
background-color: rgba(0, 0, 0, 0.3); |
| 758 |
} |
| 759 |
|
| 760 |
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */ |
| 761 |
.pswp__ui--idle .pswp__top-bar { |
| 762 |
opacity: 0; |
| 763 |
} |
| 764 |
|
| 765 |
.pswp__ui--idle .pswp__button--arrow--left, |
| 766 |
.pswp__ui--idle .pswp__button--arrow--right { |
| 767 |
opacity: 0; |
| 768 |
} |
| 769 |
|
| 770 |
/* |
| 771 |
pswp__ui--hidden class is added when controls are hidden |
| 772 |
e.g. when user taps to toggle visibility of controls |
| 773 |
*/ |
| 774 |
.pswp__ui--hidden .pswp__top-bar, |
| 775 |
.pswp__ui--hidden .pswp__caption, |
| 776 |
.pswp__ui--hidden .pswp__button--arrow--left, |
| 777 |
.pswp__ui--hidden .pswp__button--arrow--right { |
| 778 |
/* Force paint & create composition layer for controls. */ |
| 779 |
opacity: 0.001; |
| 780 |
} |
| 781 |
|
| 782 |
/* pswp__ui--one-slide class is added when there is just one item in gallery */ |
| 783 |
.pswp__ui--one-slide .pswp__button--arrow--left, |
| 784 |
.pswp__ui--one-slide .pswp__button--arrow--right, |
| 785 |
.pswp__ui--one-slide .pswp__counter { |
| 786 |
display: none; |
| 787 |
} |
| 788 |
|
| 789 |
.pswp__element--disabled { |
| 790 |
display: none !important; |
| 791 |
} |
| 792 |
|
| 793 |
.pswp--minimal--dark .pswp__top-bar { |
| 794 |
background: none; |
| 795 |
} |