bac7cf1e197c16b38dccd6f25c8bc8a0a6c7b3a2.svn-base 11 KB

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