4124a22bab756af484e6f9462fe1ac1a7be63d7447b29ec346f45898e06d26784f3f5bbed5311926c469ad110cd31579b2eab9e4bc31b7554d1eb0c93af964 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. @use 'mixins/mixins' as *;
  2. @use 'common/var' as *;
  3. @mixin op-icon() {
  4. width: 44px;
  5. height: 44px;
  6. font-size: 24px;
  7. color: #fff;
  8. background-color: getCssVar('text-color', 'regular');
  9. border-color: #fff;
  10. }
  11. @include b(image-viewer) {
  12. @include e(wrapper) {
  13. position: fixed;
  14. top: 0;
  15. right: 0;
  16. bottom: 0;
  17. left: 0;
  18. &:focus {
  19. outline: none !important;
  20. }
  21. }
  22. @include e(btn) {
  23. position: absolute;
  24. z-index: 1;
  25. display: flex;
  26. align-items: center;
  27. justify-content: center;
  28. border-radius: 50%;
  29. opacity: 0.8;
  30. cursor: pointer;
  31. box-sizing: border-box;
  32. user-select: none;
  33. .#{$namespace}-icon {
  34. cursor: pointer;
  35. }
  36. }
  37. @include e(close) {
  38. top: 40px;
  39. right: 40px;
  40. width: 40px;
  41. height: 40px;
  42. font-size: 40px;
  43. }
  44. @include e(canvas) {
  45. position: static;
  46. width: 100%;
  47. height: 100%;
  48. display: flex;
  49. justify-content: center;
  50. align-items: center;
  51. user-select: none;
  52. }
  53. @include e(actions) {
  54. left: 50%;
  55. bottom: 30px;
  56. transform: translateX(-50%);
  57. height: 44px;
  58. padding: 0 23px;
  59. background-color: getCssVar('text-color', 'regular');
  60. border-color: #fff;
  61. border-radius: 22px;
  62. @include e(actions__inner) {
  63. width: 100%;
  64. height: 100%;
  65. cursor: default;
  66. font-size: 23px;
  67. color: #fff;
  68. display: flex;
  69. align-items: center;
  70. justify-content: space-around;
  71. gap: 22px;
  72. padding: 0 6px;
  73. @include e(actions__divider) {
  74. margin: 0 -6px;
  75. }
  76. }
  77. }
  78. @include e(progress) {
  79. left: 50%;
  80. transform: translateX(-50%);
  81. cursor: default;
  82. color: #fff;
  83. bottom: 90px;
  84. }
  85. @include e(prev) {
  86. top: 50%;
  87. transform: translateY(-50%);
  88. left: 40px;
  89. @include op-icon();
  90. }
  91. @include e(next) {
  92. top: 50%;
  93. transform: translateY(-50%);
  94. right: 40px;
  95. text-indent: 2px;
  96. @include op-icon();
  97. }
  98. @include e(close) {
  99. @include op-icon();
  100. }
  101. @include e(mask) {
  102. position: absolute;
  103. width: 100%;
  104. height: 100%;
  105. top: 0;
  106. left: 0;
  107. opacity: 0.5;
  108. background: #000;
  109. }
  110. }
  111. .viewer-fade-enter-active {
  112. animation: viewer-fade-in getCssVar('transition-duration');
  113. }
  114. .viewer-fade-leave-active {
  115. animation: viewer-fade-out getCssVar('transition-duration');
  116. }
  117. @keyframes viewer-fade-in {
  118. 0% {
  119. transform: translate3d(0, -20px, 0);
  120. opacity: 0;
  121. }
  122. 100% {
  123. transform: translate3d(0, 0, 0);
  124. opacity: 1;
  125. }
  126. }
  127. @keyframes viewer-fade-out {
  128. 0% {
  129. transform: translate3d(0, 0, 0);
  130. opacity: 1;
  131. }
  132. 100% {
  133. transform: translate3d(0, -20px, 0);
  134. opacity: 0;
  135. }
  136. }