index.less 3.2 KB

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