patch.less 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. nz-table,
  2. nz-table-title-footer,
  3. nz-table-inner-scroll,
  4. nz-table-inner-default,
  5. nz-table-selection {
  6. display: block;
  7. }
  8. nz-filter-trigger {
  9. display: inline-flex;
  10. }
  11. .nz-table-out-bordered {
  12. > .@{table-prefix-cls}-title {
  13. border: @table-border;
  14. border-bottom: 0;
  15. }
  16. > .@{table-prefix-cls}-container {
  17. border: @table-border;
  18. border-bottom: 0;
  19. }
  20. > .@{table-prefix-cls}-footer {
  21. border: @table-border;
  22. border-top: 0;
  23. }
  24. }
  25. cdk-virtual-scroll-viewport.ant-table-body {
  26. overflow-y: scroll;
  27. }
  28. .nz-table-hide-scrollbar {
  29. scrollbar-color: @table-header-bg @table-header-bg;
  30. &::-webkit-scrollbar {
  31. background-color: @table-header-bg;
  32. }
  33. }
  34. .@{table-prefix-cls}.@{table-prefix-cls}-small {
  35. .nz-table-hide-scrollbar {
  36. scrollbar-color: @table-header-bg-sm @table-header-bg-sm;
  37. &::-webkit-scrollbar {
  38. background-color: transparent;
  39. }
  40. }
  41. }
  42. .ant-table-wrapper-rtl .ant-table thead > tr > th.ant-table-selection-column {
  43. text-align: center;
  44. }
  45. // virtual scroll border
  46. .@{table-prefix-cls}.@{table-prefix-cls}-bordered {
  47. > .@{table-prefix-cls}-container {
  48. > .cdk-virtual-scroll-viewport > .cdk-virtual-scroll-content-wrapper {
  49. > table {
  50. // ============================= Cell =============================
  51. > thead > tr > th,
  52. > tbody > tr > td,
  53. > tfoot > tr > th,
  54. > tfoot > tr > td {
  55. border-right: @table-border;
  56. }
  57. // ============================ Header ============================
  58. > thead {
  59. > tr:not(:last-child) > th {
  60. border-bottom: @border-width-base @border-style-base @table-border-color;
  61. }
  62. }
  63. // Fixed right should provides additional border
  64. > thead > tr,
  65. > tbody > tr,
  66. > tfoot > tr {
  67. > .@{table-prefix-cls}-cell-fix-right-first::after {
  68. border-right: @table-border;
  69. }
  70. }
  71. }
  72. // ========================== Expandable ==========================
  73. > table > tbody > tr > td {
  74. > .@{table-prefix-cls}-expanded-row-fixed {
  75. margin: -@table-padding-vertical (-@table-padding-horizontal - @border-width-base);
  76. &::after {
  77. position: absolute;
  78. top: 0;
  79. right: @border-width-base;
  80. bottom: 0;
  81. border-right: @table-border;
  82. content: '';
  83. }
  84. }
  85. }
  86. }
  87. }
  88. &.@{table-prefix-cls}-scroll-horizontal {
  89. > .@{table-prefix-cls}-container > .cdk-virtual-scroll-viewport > .cdk-virtual-scroll-content-wrapper {
  90. > table > tbody {
  91. > tr.@{table-prefix-cls}-expanded-row,
  92. > tr.@{table-prefix-cls}-placeholder {
  93. > td {
  94. border-right: 0;
  95. }
  96. }
  97. }
  98. }
  99. }
  100. // Size related
  101. &.@{table-prefix-cls}-middle {
  102. > .@{table-prefix-cls}-container {
  103. > .cdk-virtual-scroll-viewport > .cdk-virtual-scroll-content-wrapper {
  104. > table > tbody > tr > td {
  105. > .@{table-prefix-cls}-expanded-row-fixed {
  106. margin: -@table-padding-vertical-md (-@table-padding-horizontal-md - @border-width-base);
  107. }
  108. }
  109. }
  110. }
  111. }
  112. &.@{table-prefix-cls}-small {
  113. > .@{table-prefix-cls}-container {
  114. > .cdk-virtual-scroll-viewport > .cdk-virtual-scroll-content-wrapper {
  115. > table > tbody > tr > td {
  116. > .@{table-prefix-cls}-expanded-row-fixed {
  117. margin: -@table-padding-vertical-sm (-@table-padding-horizontal-sm - @border-width-base);
  118. }
  119. }
  120. }
  121. }
  122. }
  123. }
  124. .@{table-prefix-cls}-custom-column {
  125. col {
  126. display: none;
  127. width: auto !important;
  128. min-width: auto !important;
  129. }
  130. .@{table-prefix-cls}-thead {
  131. .@{table-prefix-cls}-row, tr {
  132. display: flex;
  133. justify-content: space-between;
  134. width: 100%;
  135. th {
  136. overflow: hidden;
  137. }
  138. }
  139. }
  140. .@{table-prefix-cls}-tbody {
  141. .@{table-prefix-cls}-row, tr {
  142. display: flex;
  143. justify-content: space-between;
  144. width: 100%;
  145. td {
  146. overflow: hidden;
  147. }
  148. .nz-disable-td {
  149. width: 100%;
  150. }
  151. }
  152. }
  153. .ant-table-fixed {
  154. tr {
  155. .ant-table-cell-fix-left-last, .ant-table-cell-fix-right-first {
  156. overflow: visible;
  157. }
  158. }
  159. .@{table-prefix-cls}-row {
  160. width: 100%;
  161. }
  162. }
  163. }