index.less 3.4 KB

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