_imageview.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #imageview {
  2. position: fixed;
  3. display: none;
  4. top: 0;
  5. left: 0;
  6. width: 100%;
  7. height: 100%;
  8. background-color: rgba(10, 10, 10, .98);
  9. transition: background-color .3s;
  10. /* Modes ------------------------------------------------*/
  11. &.view { background-color: inherit; }
  12. &.full { background-color: black(1); }
  13. /* ImageView ------------------------------------------------*/
  14. #image {
  15. position: absolute;
  16. top: 60px;
  17. right: 30px;
  18. bottom: 30px;
  19. left: 30px;
  20. background-repeat: no-repeat;
  21. background-position: 50% 50%;
  22. background-size: contain;
  23. transition: top .3s, right .3s, bottom .3s, left .3s, margin-top .3s, opacity .2s, transform .3s $timingBounce;
  24. animation-name: zoomIn;
  25. animation-duration: .3s;
  26. animation-timing-function: $timingBounce;
  27. will-change: transform;
  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. will-change: transform;
  64. &#previous {
  65. left: -1px;
  66. transform: translateX(-100%);
  67. }
  68. &#next {
  69. right: -1px;
  70. transform: translateX(100%);
  71. }
  72. }
  73. &:hover a#previous,
  74. &:hover a#next { transform: translateX(0); }
  75. a:hover { opacity: 1; }
  76. .iconic {
  77. fill: white(.8);
  78. filter: drop-shadow(0 1px 0 black(.4));
  79. }
  80. }
  81. }