index.less 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. @prefix-cls: ~'@{namespace}-multiple-tabs';
  2. @ventSpace: zxm;
  3. html[data-theme='dark'] {
  4. .@{prefix-cls} {
  5. .@{ventSpace}-tabs-tab {
  6. border-bottom: 1px solid @border-color-base;
  7. }
  8. }
  9. }
  10. html[data-theme='light'] {
  11. .@{prefix-cls} {
  12. .@{ventSpace}-tabs-tab:not(.@{ventSpace}-tabs-tab-active) {
  13. border: 1px solid #e6e6e6;
  14. }
  15. }
  16. }
  17. .@{prefix-cls} {
  18. z-index: 10;
  19. height: @multiple-height + 2;
  20. line-height: @multiple-height + 2;
  21. background-color: @component-background;
  22. border-bottom: 1px solid @border-color-base;
  23. box-shadow: 0 4px 4px rgb(0 21 41 / 8%);
  24. .@{ventSpace}-tabs-small {
  25. height: calc(@multiple-height + 4px);
  26. }
  27. .@{ventSpace}-tabs.@{ventSpace}-tabs-card {
  28. padding-left: 10px;
  29. .@{ventSpace}-tabs-nav {
  30. height: calc(@multiple-height);
  31. margin: 0;
  32. background-color: @component-background;
  33. border: 0;
  34. box-shadow: none;
  35. .@{ventSpace}-tabs-nav-wrap {
  36. height: @multiple-height;
  37. margin-top: 2px;
  38. }
  39. .@{ventSpace}-tabs-tab {
  40. height: calc(@multiple-height - 4px);
  41. padding-right: 12px;
  42. line-height: calc(@multiple-height - 4px);
  43. color: @text-color-base;
  44. background-color: @component-background;
  45. transition: none;
  46. .@{ventSpace}-tabs-tab-btn {
  47. color: @text-color-base;
  48. transition: none;
  49. }
  50. &:hover {
  51. .@{ventSpace}-tabs-tab-remove .anticon-close {
  52. opacity: 1;
  53. }
  54. }
  55. .@{ventSpace}-tabs-tab-remove {
  56. margin: 0;
  57. padding: 0;
  58. position: relative;
  59. top: 0;
  60. left: 4px;
  61. .anticon-close {
  62. width: 8px;
  63. height: 12px;
  64. font-size: 12px;
  65. color: inherit;
  66. opacity: 0;
  67. transition: none;
  68. &:hover {
  69. svg {
  70. width: 0.8em;
  71. }
  72. }
  73. }
  74. }
  75. > div {
  76. display: flex;
  77. justify-content: center;
  78. align-items: center;
  79. }
  80. svg {
  81. fill: @text-color-base;
  82. }
  83. }
  84. .@{ventSpace}-tabs-tab:not(.@{ventSpace}-tabs-tab-active) {
  85. &:hover {
  86. background-color: #ecf5ff;
  87. color: @primary-color;
  88. border-color: #b3d8ff;
  89. }
  90. }
  91. .@{ventSpace}-tabs-tab-active {
  92. position: relative;
  93. padding-left: 18px;
  94. color: @white !important;
  95. background: @primary-color;
  96. border: 1px solid transparent;
  97. transition: none;
  98. .@{ventSpace}-tabs-tab-btn {
  99. color: @white;
  100. }
  101. .@{ventSpace}-tabs-tab-remove .anticon-close {
  102. opacity: 1;
  103. }
  104. svg {
  105. width: 0.7em;
  106. fill: @white;
  107. }
  108. }
  109. }
  110. .@{ventSpace}-tabs-nav > div:nth-child(1) {
  111. padding: 0 6px;
  112. .@{ventSpace}-tabs-tab {
  113. margin-right: 6px !important;
  114. }
  115. }
  116. }
  117. .@{ventSpace}-tabs-tab:not(.@{ventSpace}-tabs-tab-active) {
  118. .@{ventSpace}-tabs-tab-remove .anticon-close {
  119. font-size: 12px;
  120. svg {
  121. width: 0.6em;
  122. }
  123. }
  124. }
  125. .@{ventSpace}-tabs-extra-content {
  126. margin-top: 2px;
  127. line-height: @multiple-height !important;
  128. }
  129. .@{ventSpace}-dropdown-trigger {
  130. display: inline-flex;
  131. }
  132. &--hide-close {
  133. .@{ventSpace}-tabs-tab-remove .anticon-close {
  134. opacity: 0 !important;
  135. }
  136. }
  137. &-content {
  138. &__extra-quick,
  139. &__extra-redo,
  140. &__extra-fold {
  141. display: inline-block;
  142. width: 36px;
  143. height: @multiple-height;
  144. line-height: @multiple-height;
  145. color: @text-color-secondary;
  146. text-align: center;
  147. cursor: pointer;
  148. border-left: 1px solid @border-color-base;
  149. &:hover {
  150. color: @text-color-base;
  151. }
  152. span[role='img'] {
  153. transform: rotate(90deg);
  154. }
  155. }
  156. &__extra-redo {
  157. span[role='img'] {
  158. transform: rotate(0deg);
  159. }
  160. }
  161. &__info {
  162. display: inline-block;
  163. width: 100%;
  164. height: @multiple-height - 2;
  165. padding-left: 0;
  166. margin-left: -10px;
  167. font-size: 12px;
  168. cursor: pointer;
  169. user-select: none;
  170. }
  171. }
  172. }
  173. .@{ventSpace}-tabs-dropdown-menu {
  174. &-title-content {
  175. display: flex;
  176. align-items: center;
  177. .@{prefix-cls} {
  178. &-content__info {
  179. width: auto;
  180. margin-left: 0;
  181. line-height: 28px;
  182. }
  183. }
  184. }
  185. &-item-remove {
  186. margin-left: auto;
  187. }
  188. }
  189. .multiple-tabs__dropdown {
  190. .@{ventSpace}-dropdown-content {
  191. width: 172px;
  192. }
  193. }