_imageview.scss 1.9 KB

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