image-viewer.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. text-align: justify;
  65. cursor: default;
  66. font-size: 23px;
  67. color: #fff;
  68. display: flex;
  69. align-items: center;
  70. justify-content: space-around;
  71. }
  72. }
  73. @include e(prev) {
  74. top: 50%;
  75. transform: translateY(-50%);
  76. left: 40px;
  77. @include op-icon();
  78. }
  79. @include e(next) {
  80. top: 50%;
  81. transform: translateY(-50%);
  82. right: 40px;
  83. text-indent: 2px;
  84. @include op-icon();
  85. }
  86. @include e(close) {
  87. @include op-icon();
  88. }
  89. @include e(mask) {
  90. position: absolute;
  91. width: 100%;
  92. height: 100%;
  93. top: 0;
  94. left: 0;
  95. opacity: 0.5;
  96. background: #000;
  97. }
  98. }
  99. .viewer-fade-enter-active {
  100. animation: viewer-fade-in getCssVar('transition-duration');
  101. }
  102. .viewer-fade-leave-active {
  103. animation: viewer-fade-out getCssVar('transition-duration');
  104. }
  105. @keyframes viewer-fade-in {
  106. 0% {
  107. transform: translate3d(0, -20px, 0);
  108. opacity: 0;
  109. }
  110. 100% {
  111. transform: translate3d(0, 0, 0);
  112. opacity: 1;
  113. }
  114. }
  115. @keyframes viewer-fade-out {
  116. 0% {
  117. transform: translate3d(0, 0, 0);
  118. opacity: 1;
  119. }
  120. 100% {
  121. transform: translate3d(0, -20px, 0);
  122. opacity: 0;
  123. }
  124. }