index.less 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. @import (reference) '../../../design/index.less';
  2. .multiple-tabs {
  3. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  4. .ant-tabs-small {
  5. height: @multiple-height;
  6. }
  7. // .ant-tabs:not(.ant-tabs-card) {
  8. // .ant-tabs-nav-container {
  9. // height: @multiple-height;
  10. // background: @white;
  11. // }
  12. // .ant-tabs-tab {
  13. // font-size: 14px;
  14. // line-height: 1.5515;
  15. // background: @white;
  16. // }
  17. // }
  18. .ant-tabs.ant-tabs-card {
  19. .ant-tabs-card-bar {
  20. height: @multiple-height;
  21. margin: 0;
  22. background: @white;
  23. border: 0;
  24. box-shadow: 0 4px 26px 1px rgba(0, 0, 0, 0.08);
  25. .ant-tabs-nav-container {
  26. height: @multiple-height;
  27. padding-top: 2px;
  28. }
  29. .ant-tabs-tab {
  30. height: calc(@multiple-height - 2px);
  31. font-size: 14px;
  32. line-height: calc(@multiple-height - 2px);
  33. color: @text-color-call-out;
  34. background: @white;
  35. border: 1px solid @border-color-shallow-dark;
  36. border-radius: 4px 4px 0 0;
  37. transition: none;
  38. .ant-tabs-close-x {
  39. color: inherit;
  40. }
  41. > div {
  42. display: flex;
  43. justify-content: center;
  44. align-items: center;
  45. }
  46. svg {
  47. fill: @text-color-base;
  48. }
  49. &::before {
  50. position: absolute;
  51. top: -2px;
  52. right: 0;
  53. left: 0;
  54. height: 4px;
  55. background-color: @primary-color;
  56. border-radius: 16px 6px 0 0;
  57. content: '';
  58. transform: scaleX(0);
  59. transform-origin: bottom right;
  60. }
  61. &:hover::before {
  62. transform: scaleX(1);
  63. transition: transform 0.4s ease;
  64. transform-origin: bottom left;
  65. }
  66. }
  67. .ant-tabs-tab-active {
  68. height: calc(@multiple-height - 3px);
  69. color: @white;
  70. // background: @primary-color;
  71. background: linear-gradient(
  72. 118deg,
  73. rgba(@primary-color, 0.8),
  74. rgba(@primary-color, 1)
  75. ) !important;
  76. border: 0;
  77. box-shadow: 0 0 6px 1px rgba(@primary-color, 0.4);
  78. &::before {
  79. display: none;
  80. }
  81. svg {
  82. fill: @white;
  83. }
  84. }
  85. }
  86. .ant-tabs-nav > div:nth-child(1) {
  87. padding: 0 10px;
  88. }
  89. .ant-tabs-tab-prev,
  90. .ant-tabs-tab-next {
  91. color: @border-color-dark;
  92. background: @white;
  93. }
  94. }
  95. .ant-tabs-tab:not(.ant-tabs-tab-active) {
  96. .anticon-close {
  97. font-size: 12px;
  98. svg {
  99. width: 0.8em;
  100. }
  101. }
  102. &:hover {
  103. .anticon-close {
  104. color: @white;
  105. }
  106. }
  107. }
  108. }
  109. .ant-tabs-extra-content {
  110. line-height: @multiple-height;
  111. }
  112. .multiple-tabs-content {
  113. &__extra {
  114. display: inline-block;
  115. width: @multiple-height;
  116. height: @multiple-height;
  117. line-height: @multiple-height;
  118. color: @primary-color;
  119. text-align: center;
  120. cursor: pointer;
  121. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  122. span[role='img'] {
  123. transform: rotate(90deg);
  124. }
  125. }
  126. &__content {
  127. display: inline-block;
  128. width: 100%;
  129. padding-left: 10px;
  130. margin-left: -10px;
  131. cursor: pointer;
  132. user-select: none;
  133. }
  134. }