_imageview.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /**
  2. * @copyright 2015 by Tobias Reich
  3. */
  4. #imageview {
  5. position: fixed;
  6. display: none;
  7. width: 100%;
  8. height: 100%;
  9. background-color: rgba(10, 10, 10, .98);
  10. transition: background-color .3s;
  11. /* Modes ------------------------------------------------*/
  12. &.view { background-color: inherit; }
  13. &.full { background-color: black(1); }
  14. /* ImageView ------------------------------------------------*/
  15. #image {
  16. position: absolute;
  17. top: 60px;
  18. right: 30px;
  19. bottom: 30px;
  20. left: 30px;
  21. background-repeat: no-repeat;
  22. background-position: 50% 50%;
  23. background-size: contain;
  24. transition: top .3s, right .3s, bottom .3s, left .3s, margin-top .3s, opacity .2s, transform .3s $timingBounce;
  25. animation-name: zoomIn;
  26. animation-duration: .3s;
  27. animation-timing-function: $timingBounce;
  28. &.small {
  29. top: 50%;
  30. right: auto;
  31. bottom: auto;
  32. left: 50%;
  33. }
  34. &.full {
  35. top: 0;
  36. right: 0;
  37. bottom: 0;
  38. left: 0;
  39. }
  40. }
  41. /* Previous/Next Buttons ------------------------------------------------*/
  42. .arrow_wrapper {
  43. position: fixed;
  44. width: 15%;
  45. height: calc(100% - 60px);
  46. top: 60px;
  47. &--previous { left: 0; }
  48. &--next { right: 0; }
  49. a {
  50. position: fixed;
  51. top: 50%;
  52. margin: -19px 0 0;
  53. padding: 8px 12px;
  54. width: 16px;
  55. height: 22px;
  56. // The background-image will be styled dynamically via JS
  57. // background-image: linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)), url('');
  58. background-size: 100% 100%;
  59. border: 1px solid white(.8);
  60. opacity: .6;
  61. z-index: 2;
  62. transition: transform .2s ease-out, opacity .2s ease-out;
  63. &#previous {
  64. left: -1px;
  65. transform: translateX(-100%);
  66. }
  67. &#next {
  68. right: -1px;
  69. transform: translateX(100%);
  70. }
  71. }
  72. &:hover a#previous,
  73. &:hover a#next { transform: translateX(0); }
  74. a:hover { opacity: 1; }
  75. .iconic {
  76. fill: white(.8);
  77. filter: drop-shadow(0 1px 0 black(.4));
  78. }
  79. }
  80. }