_imageview.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. z-index: 1;
  48. &--previous { left: 0; }
  49. &--next { right: 0; }
  50. a {
  51. position: fixed;
  52. top: 50%;
  53. margin: -19px 0 0;
  54. padding: 8px 12px;
  55. width: 16px;
  56. height: 22px;
  57. // The background-image will be styled dynamically via JS
  58. // background-image: linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)), url('');
  59. background-size: 100% 100%;
  60. border: 1px solid white(.8);
  61. cursor: pointer;
  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. }