c1e32f8e6c67a766199d5321b2e03128f8295142b0f907675023461c601d128377b932b88acdb24969c4d56bedb3a6f11edb9848544abc88108310c65da4a7 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @use 'mixins/mixins' as *;
  2. @use 'mixins/var' as *;
  3. @use 'common/var' as *;
  4. @include b(splitter) {
  5. position: relative;
  6. display: flex;
  7. height: 100%;
  8. width: 100%;
  9. margin: 0;
  10. padding: 0;
  11. @include e(mask) {
  12. position: absolute;
  13. z-index: 999;
  14. left: 0;
  15. right: 0;
  16. top: 0;
  17. bottom: 0;
  18. }
  19. @include e(mask-horizontal) {
  20. cursor: ew-resize;
  21. }
  22. @include e(mask-vertical) {
  23. cursor: ns-resize;
  24. }
  25. @include e(horizontal) {
  26. flex-direction: row;
  27. }
  28. @include e(vertical) {
  29. flex-direction: column;
  30. }
  31. }
  32. @include b(splitter-bar) {
  33. flex: none;
  34. position: relative;
  35. user-select: none;
  36. @include e(dragger) {
  37. z-index: 1;
  38. position: absolute;
  39. background: transparent;
  40. top: 50%;
  41. left: 50%;
  42. transform: translate(-50%, -50%);
  43. &::before,
  44. &::after {
  45. content: '';
  46. position: absolute;
  47. top: 50%;
  48. left: 50%;
  49. transform: translate(-50%, -50%);
  50. background-color: getCssVar('border-color-light');
  51. }
  52. &:not(.is-lazy)::after {
  53. display: none;
  54. }
  55. &::after {
  56. opacity: 0.4;
  57. }
  58. &:hover {
  59. &:not(.is-disabled)::before {
  60. background-color: getCssVar('color-primary-light-5');
  61. }
  62. }
  63. }
  64. @include e(dragger-horizontal) {
  65. &::before,
  66. &::after {
  67. height: 100%;
  68. width: 2px;
  69. }
  70. }
  71. @include e(dragger-vertical) {
  72. &::before,
  73. &::after {
  74. height: 2px;
  75. width: 100%;
  76. }
  77. }
  78. @include e(dragger-active) {
  79. &::before,
  80. &::after {
  81. background-color: getCssVar('color-primary-light-3');
  82. }
  83. &.#{$namespace}-splitter-bar__dragger-horizontal::after {
  84. transform: translate(calc(-50% + getCssVar('splitter-bar-offset')), -50%);
  85. }
  86. &.#{$namespace}-splitter-bar__dragger-vertical::after {
  87. transform: translate(-50%, calc(-50% + getCssVar('splitter-bar-offset')));
  88. }
  89. }
  90. &:hover {
  91. @include e(collapse-icon) {
  92. opacity: 1;
  93. }
  94. }
  95. @include e(collapse-icon) {
  96. display: flex;
  97. align-items: center;
  98. justify-content: center;
  99. position: absolute;
  100. background: getCssVar('border-color-light');
  101. border-radius: 2px;
  102. cursor: pointer;
  103. opacity: 0;
  104. z-index: 9;
  105. &:hover {
  106. opacity: 1;
  107. background-color: getCssVar('color-primary-light-5');
  108. }
  109. }
  110. @include e(horizontal-collapse-icon-start) {
  111. left: -12px;
  112. top: 50%;
  113. height: 24px;
  114. width: 16px;
  115. transform: translate(-50%, -50%);
  116. }
  117. @include e(horizontal-collapse-icon-end) {
  118. left: 12px;
  119. top: 50%;
  120. height: 24px;
  121. width: 16px;
  122. transform: translate(-50%, -50%);
  123. }
  124. @include e(vertical-collapse-icon-start) {
  125. top: -12px;
  126. right: 50%;
  127. height: 16px;
  128. width: 24px;
  129. transform: translate(50%, -50%);
  130. }
  131. @include e(vertical-collapse-icon-end) {
  132. top: 12px;
  133. right: 50%;
  134. height: 16px;
  135. width: 24px;
  136. transform: translate(50%, -50%);
  137. }
  138. }