index.less 3.0 KB

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