default-skin.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. /*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
  2. /*
  3. Contents:
  4. 1. Buttons
  5. 2. Share modal and links
  6. 3. Index indicator ("1 of X" counter)
  7. 4. Caption
  8. 5. Loading indicator
  9. 6. Additional styles (root element, top bar, idle state, hidden state, etc.)
  10. */
  11. /* 1. Buttons */
  12. /* <button> css reset */
  13. .pswp__button {
  14. width: 44px;
  15. height: 44px;
  16. position: relative;
  17. background: none;
  18. cursor: pointer;
  19. overflow: visible;
  20. -webkit-appearance: none;
  21. display: block;
  22. border: 0;
  23. padding: 0;
  24. margin: 0;
  25. float: right;
  26. opacity: 0.75;
  27. -webkit-transition: opacity 0.2s;
  28. transition: opacity 0.2s;
  29. -webkit-box-shadow: none;
  30. box-shadow: none;
  31. }
  32. .pswp__button:focus,
  33. .pswp__button:hover {
  34. opacity: 1;
  35. }
  36. .pswp__button:active {
  37. outline: none;
  38. opacity: 0.9;
  39. }
  40. .pswp__button::-moz-focus-inner {
  41. padding: 0;
  42. border: 0;
  43. }
  44. /* pswp__ui--over-close class it added when mouse is over element that should close gallery */
  45. .pswp__ui--over-close .pswp__button--close {
  46. opacity: 1;
  47. }
  48. .pswp__button,
  49. .pswp__button--arrow--left:before,
  50. .pswp__button--arrow--right:before {
  51. background: url(default-skin.png) 0 0 no-repeat;
  52. background-size: 264px 88px;
  53. width: 44px;
  54. height: 44px;
  55. }
  56. @media (-webkit-min-device-pixel-ratio: 1.1),
  57. (-webkit-min-device-pixel-ratio: 1.09375),
  58. (min-resolution: 105dpi),
  59. (min-resolution: 1.1dppx) {
  60. /* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
  61. .pswp--svg .pswp__button,
  62. .pswp--svg .pswp__button--arrow--left:before,
  63. .pswp--svg .pswp__button--arrow--right:before {
  64. background-image: url(default-skin.svg);
  65. }
  66. .pswp--svg .pswp__button--arrow--left,
  67. .pswp--svg .pswp__button--arrow--right {
  68. background: none;
  69. }
  70. }
  71. .pswp__button--close {
  72. background-position: 0 -44px;
  73. }
  74. .pswp__button--share {
  75. background-position: -44px -44px;
  76. }
  77. .pswp__button--fs {
  78. display: none;
  79. }
  80. .pswp--supports-fs .pswp__button--fs {
  81. display: block;
  82. }
  83. .pswp--fs .pswp__button--fs {
  84. background-position: -44px 0;
  85. }
  86. .pswp__button--zoom {
  87. display: none;
  88. background-position: -88px 0;
  89. }
  90. .pswp--zoom-allowed .pswp__button--zoom {
  91. display: block;
  92. }
  93. .pswp--zoomed-in .pswp__button--zoom {
  94. background-position: -132px 0;
  95. }
  96. /* no arrows on touch screens */
  97. .pswp--touch .pswp__button--arrow--left,
  98. .pswp--touch .pswp__button--arrow--right {
  99. visibility: hidden;
  100. }
  101. /*
  102. Arrow buttons hit area
  103. (icon is added to :before pseudo-element)
  104. */
  105. .pswp__button--arrow--left,
  106. .pswp__button--arrow--right {
  107. background: none;
  108. top: 50%;
  109. margin-top: -50px;
  110. width: 70px;
  111. height: 100px;
  112. position: absolute;
  113. }
  114. .pswp__button--arrow--left {
  115. left: 0;
  116. }
  117. .pswp__button--arrow--right {
  118. right: 0;
  119. }
  120. .pswp__button--arrow--left:before,
  121. .pswp__button--arrow--right:before {
  122. content: '';
  123. top: 35px;
  124. background-color: rgba(0, 0, 0, 0.3);
  125. height: 30px;
  126. width: 32px;
  127. position: absolute;
  128. }
  129. .pswp__button--arrow--left:before {
  130. left: 6px;
  131. background-position: -138px -44px;
  132. }
  133. .pswp__button--arrow--right:before {
  134. right: 6px;
  135. background-position: -94px -44px;
  136. }
  137. /*
  138. 2. Share modal/popup and links
  139. */
  140. .pswp__counter,
  141. .pswp__share-modal {
  142. -webkit-user-select: none;
  143. -moz-user-select: none;
  144. -ms-user-select: none;
  145. user-select: none;
  146. }
  147. .pswp__share-modal {
  148. display: block;
  149. background: rgba(0, 0, 0, 0.5);
  150. width: 100%;
  151. height: 100%;
  152. top: 0;
  153. left: 0;
  154. padding: 10px;
  155. position: absolute;
  156. z-index: 1600;
  157. opacity: 0;
  158. -webkit-transition: opacity 0.25s ease-out;
  159. transition: opacity 0.25s ease-out;
  160. -webkit-backface-visibility: hidden;
  161. will-change: opacity;
  162. }
  163. .pswp__share-modal--hidden {
  164. display: none;
  165. }
  166. .pswp__share-tooltip {
  167. z-index: 1620;
  168. position: absolute;
  169. background: #FFF;
  170. top: 56px;
  171. border-radius: 2px;
  172. display: block;
  173. width: auto;
  174. right: 44px;
  175. -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  176. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  177. -webkit-transform: translateY(6px);
  178. -ms-transform: translateY(6px);
  179. transform: translateY(6px);
  180. -webkit-transition: -webkit-transform 0.25s;
  181. transition: transform 0.25s;
  182. -webkit-backface-visibility: hidden;
  183. will-change: transform;
  184. }
  185. .pswp__share-tooltip a {
  186. display: block;
  187. padding: 8px 12px;
  188. color: #000;
  189. text-decoration: none;
  190. font-size: 14px;
  191. line-height: 18px;
  192. }
  193. .pswp__share-tooltip a:hover {
  194. text-decoration: none;
  195. color: #000;
  196. }
  197. .pswp__share-tooltip a:first-child {
  198. /* round corners on the first/last list item */
  199. border-radius: 2px 2px 0 0;
  200. }
  201. .pswp__share-tooltip a:last-child {
  202. border-radius: 0 0 2px 2px;
  203. }
  204. .pswp__share-modal--fade-in {
  205. opacity: 1;
  206. }
  207. .pswp__share-modal--fade-in .pswp__share-tooltip {
  208. -webkit-transform: translateY(0);
  209. -ms-transform: translateY(0);
  210. transform: translateY(0);
  211. }
  212. /* increase size of share links on touch devices */
  213. .pswp--touch .pswp__share-tooltip a {
  214. padding: 16px 12px;
  215. }
  216. a.pswp__share--facebook:before {
  217. content: '';
  218. display: block;
  219. width: 0;
  220. height: 0;
  221. position: absolute;
  222. top: -12px;
  223. right: 15px;
  224. border: 6px solid transparent;
  225. border-bottom-color: #FFF;
  226. -webkit-pointer-events: none;
  227. -moz-pointer-events: none;
  228. pointer-events: none;
  229. }
  230. a.pswp__share--facebook:hover {
  231. background: #3E5C9A;
  232. color: #FFF;
  233. }
  234. a.pswp__share--facebook:hover:before {
  235. border-bottom-color: #3E5C9A;
  236. }
  237. a.pswp__share--twitter:hover {
  238. background: #55ACEE;
  239. color: #FFF;
  240. }
  241. a.pswp__share--pinterest:hover {
  242. background: #CCC;
  243. color: #CE272D;
  244. }
  245. a.pswp__share--download:hover {
  246. background: #DDD;
  247. }
  248. /*
  249. 3. Index indicator ("1 of X" counter)
  250. */
  251. .pswp__counter {
  252. position: absolute;
  253. left: 0;
  254. top: 0;
  255. height: 44px;
  256. font-size: 13px;
  257. line-height: 44px;
  258. color: #FFF;
  259. opacity: 0.75;
  260. padding: 0 10px;
  261. }
  262. /*
  263. 4. Caption
  264. */
  265. .pswp__caption {
  266. position: absolute;
  267. left: 0;
  268. bottom: 0;
  269. width: 100%;
  270. min-height: 44px;
  271. }
  272. .pswp__caption small {
  273. font-size: 11px;
  274. color: #BBB;
  275. }
  276. .pswp__caption__center {
  277. text-align: left;
  278. max-width: 420px;
  279. margin: 0 auto;
  280. font-size: 13px;
  281. padding: 10px;
  282. line-height: 20px;
  283. color: #CCC;
  284. }
  285. .pswp__caption--empty {
  286. display: none;
  287. }
  288. /* Fake caption element, used to calculate height of next/prev image */
  289. .pswp__caption--fake {
  290. visibility: hidden;
  291. }
  292. /*
  293. 5. Loading indicator (preloader)
  294. You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
  295. */
  296. .pswp__preloader {
  297. width: 44px;
  298. height: 44px;
  299. position: absolute;
  300. top: 0;
  301. left: 50%;
  302. margin-left: -22px;
  303. opacity: 0;
  304. -webkit-transition: opacity 0.25s ease-out;
  305. transition: opacity 0.25s ease-out;
  306. will-change: opacity;
  307. direction: ltr;
  308. }
  309. .pswp__preloader__icn {
  310. width: 20px;
  311. height: 20px;
  312. margin: 12px;
  313. }
  314. .pswp__preloader--active {
  315. opacity: 1;
  316. }
  317. .pswp__preloader--active .pswp__preloader__icn {
  318. /* We use .gif in browsers that don't support CSS animation */
  319. background: url(preloader.gif) 0 0 no-repeat;
  320. }
  321. .pswp--css_animation .pswp__preloader--active {
  322. opacity: 1;
  323. }
  324. .pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
  325. -webkit-animation: clockwise 500ms linear infinite;
  326. animation: clockwise 500ms linear infinite;
  327. }
  328. .pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
  329. -webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
  330. animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
  331. }
  332. .pswp--css_animation .pswp__preloader__icn {
  333. background: none;
  334. opacity: 0.75;
  335. width: 14px;
  336. height: 14px;
  337. position: absolute;
  338. left: 15px;
  339. top: 15px;
  340. margin: 0;
  341. }
  342. .pswp--css_animation .pswp__preloader__cut {
  343. /*
  344. The idea of animating inner circle is based on Polymer ("material") loading indicator
  345. by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
  346. */
  347. position: relative;
  348. width: 7px;
  349. height: 14px;
  350. overflow: hidden;
  351. }
  352. .pswp--css_animation .pswp__preloader__donut {
  353. -webkit-box-sizing: border-box;
  354. box-sizing: border-box;
  355. width: 14px;
  356. height: 14px;
  357. border: 2px solid #FFF;
  358. border-radius: 50%;
  359. border-left-color: transparent;
  360. border-bottom-color: transparent;
  361. position: absolute;
  362. top: 0;
  363. left: 0;
  364. background: none;
  365. margin: 0;
  366. }
  367. @media screen and (max-width: 1024px) {
  368. .pswp__preloader {
  369. position: relative;
  370. left: auto;
  371. top: auto;
  372. margin: 0;
  373. float: right;
  374. }
  375. }
  376. @-webkit-keyframes clockwise {
  377. 0% {
  378. -webkit-transform: rotate(0deg);
  379. transform: rotate(0deg);
  380. }
  381. 100% {
  382. -webkit-transform: rotate(360deg);
  383. transform: rotate(360deg);
  384. }
  385. }
  386. @keyframes clockwise {
  387. 0% {
  388. -webkit-transform: rotate(0deg);
  389. transform: rotate(0deg);
  390. }
  391. 100% {
  392. -webkit-transform: rotate(360deg);
  393. transform: rotate(360deg);
  394. }
  395. }
  396. @-webkit-keyframes donut-rotate {
  397. 0% {
  398. -webkit-transform: rotate(0);
  399. transform: rotate(0);
  400. }
  401. 50% {
  402. -webkit-transform: rotate(-140deg);
  403. transform: rotate(-140deg);
  404. }
  405. 100% {
  406. -webkit-transform: rotate(0);
  407. transform: rotate(0);
  408. }
  409. }
  410. @keyframes donut-rotate {
  411. 0% {
  412. -webkit-transform: rotate(0);
  413. transform: rotate(0);
  414. }
  415. 50% {
  416. -webkit-transform: rotate(-140deg);
  417. transform: rotate(-140deg);
  418. }
  419. 100% {
  420. -webkit-transform: rotate(0);
  421. transform: rotate(0);
  422. }
  423. }
  424. /*
  425. 6. Additional styles
  426. */
  427. /* root element of UI */
  428. .pswp__ui {
  429. -webkit-font-smoothing: auto;
  430. visibility: visible;
  431. opacity: 1;
  432. z-index: 1550;
  433. }
  434. /* top black bar with buttons and "1 of X" indicator */
  435. .pswp__top-bar {
  436. position: absolute;
  437. left: 0;
  438. top: 0;
  439. height: 44px;
  440. width: 100%;
  441. }
  442. .pswp__caption,
  443. .pswp__top-bar,
  444. .pswp--has_mouse .pswp__button--arrow--left,
  445. .pswp--has_mouse .pswp__button--arrow--right {
  446. -webkit-backface-visibility: hidden;
  447. will-change: opacity;
  448. -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
  449. transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
  450. }
  451. /* pswp--has_mouse class is added only when two subsequent mousemove events occur */
  452. .pswp--has_mouse .pswp__button--arrow--left,
  453. .pswp--has_mouse .pswp__button--arrow--right {
  454. visibility: visible;
  455. }
  456. .pswp__top-bar,
  457. .pswp__caption {
  458. background-color: rgba(0, 0, 0, 0.5);
  459. }
  460. /* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
  461. .pswp__ui--fit .pswp__top-bar,
  462. .pswp__ui--fit .pswp__caption {
  463. background-color: rgba(0, 0, 0, 0.3);
  464. }
  465. /* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
  466. .pswp__ui--idle .pswp__top-bar {
  467. opacity: 0;
  468. }
  469. .pswp__ui--idle .pswp__button--arrow--left,
  470. .pswp__ui--idle .pswp__button--arrow--right {
  471. opacity: 0;
  472. }
  473. /*
  474. pswp__ui--hidden class is added when controls are hidden
  475. e.g. when user taps to toggle visibility of controls
  476. */
  477. .pswp__ui--hidden .pswp__top-bar,
  478. .pswp__ui--hidden .pswp__caption,
  479. .pswp__ui--hidden .pswp__button--arrow--left,
  480. .pswp__ui--hidden .pswp__button--arrow--right {
  481. /* Force paint & create composition layer for controls. */
  482. opacity: 0.001;
  483. }
  484. /* pswp__ui--one-slide class is added when there is just one item in gallery */
  485. .pswp__ui--one-slide .pswp__button--arrow--left,
  486. .pswp__ui--one-slide .pswp__button--arrow--right,
  487. .pswp__ui--one-slide .pswp__counter {
  488. display: none;
  489. }
  490. .pswp__element--disabled {
  491. display: none !important;
  492. }
  493. .pswp--minimal--dark .pswp__top-bar {
  494. background: none;
  495. }