_imageview.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. transition: top .3s, right .3s, bottom .3s, left .3s, margin-top .3s, opacity .2s, transform .3s $timingBounce;
  21. will-change: transform;
  22. background-repeat: no-repeat;
  23. background-position: 50% 50%;
  24. background-size: contain;
  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. 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 {
  75. transform: translateX(0);
  76. }
  77. a:hover {
  78. opacity: 1;
  79. }
  80. .iconic {
  81. fill: white(.8);
  82. filter: drop-shadow(0 1px 0 black(.4));
  83. }
  84. }
  85. }