image-viewer.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. }
  19. @include e(btn) {
  20. position: absolute;
  21. z-index: 1;
  22. display: flex;
  23. align-items: center;
  24. justify-content: center;
  25. border-radius: 50%;
  26. opacity: 0.8;
  27. cursor: pointer;
  28. box-sizing: border-box;
  29. user-select: none;
  30. .#{$namespace}-icon {
  31. font-size: inherit;
  32. cursor: pointer;
  33. }
  34. }
  35. @include e(close) {
  36. top: 40px;
  37. right: 40px;
  38. width: 40px;
  39. height: 40px;
  40. font-size: 40px;
  41. }
  42. @include e(canvas) {
  43. position: static;
  44. width: 100%;
  45. height: 100%;
  46. display: flex;
  47. justify-content: center;
  48. align-items: center;
  49. user-select: none;
  50. }
  51. @include e(actions) {
  52. left: 50%;
  53. bottom: 30px;
  54. transform: translateX(-50%);
  55. width: 282px;
  56. height: 44px;
  57. padding: 0 23px;
  58. background-color: getCssVar('text-color', 'regular');
  59. border-color: #fff;
  60. border-radius: 22px;
  61. @include e(actions__inner) {
  62. width: 100%;
  63. height: 100%;
  64. cursor: default;
  65. font-size: 23px;
  66. color: #fff;
  67. display: flex;
  68. align-items: center;
  69. justify-content: space-around;
  70. }
  71. }
  72. @include e(prev) {
  73. top: 50%;
  74. transform: translateY(-50%);
  75. left: 40px;
  76. @include op-icon();
  77. }
  78. @include e(next) {
  79. top: 50%;
  80. transform: translateY(-50%);
  81. right: 40px;
  82. text-indent: 2px;
  83. @include op-icon();
  84. }
  85. @include e(close) {
  86. @include op-icon();
  87. }
  88. @include e(mask) {
  89. position: absolute;
  90. width: 100%;
  91. height: 100%;
  92. top: 0;
  93. left: 0;
  94. opacity: 0.5;
  95. background: #000;
  96. }
  97. }
  98. .viewer-fade-enter-active {
  99. animation: viewer-fade-in getCssVar('transition-duration');
  100. }
  101. .viewer-fade-leave-active {
  102. animation: viewer-fade-out getCssVar('transition-duration');
  103. }
  104. @keyframes viewer-fade-in {
  105. 0% {
  106. transform: translate3d(0, -20px, 0);
  107. opacity: 0;
  108. }
  109. 100% {
  110. transform: translate3d(0, 0, 0);
  111. opacity: 1;
  112. }
  113. }
  114. @keyframes viewer-fade-out {
  115. 0% {
  116. transform: translate3d(0, 0, 0);
  117. opacity: 1;
  118. }
  119. 100% {
  120. transform: translate3d(0, -20px, 0);
  121. opacity: 0;
  122. }
  123. }