index.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. .ld-table-wrapper {
  2. width: 100%;
  3. border-inline-start: 1px solid var(--border-color-light);
  4. border-start-start-radius: var(--border-radius);
  5. border-start-end-radius: var(--border-radius);
  6. }
  7. .ld-table {
  8. --animate-duration: 150ms;
  9. min-width: 100%;
  10. padding: 0;
  11. margin: 0;
  12. overflow: unset;
  13. font-size: 14px;
  14. line-height: 1.5714;
  15. color: var(--subtitle-font-color);
  16. text-align: start;
  17. list-style: none;
  18. border-spacing: 0;
  19. border-collapse: separate;
  20. background: var(--layout-background-color);
  21. border-top: 1px solid var(--border-color-light);
  22. border-radius: var(--border-radius) var(--border-radius) 0 0;
  23. }
  24. .ld-fixed-table {
  25. table-layout: fixed;
  26. }
  27. .ld-table-ellipsis {
  28. & span {
  29. display: block;
  30. overflow: hidden;
  31. text-overflow: ellipsis;
  32. white-space: nowrap;
  33. }
  34. }
  35. & .ld-table-right-fixed-shadow,
  36. & .ld-table-left-fixed-shadow {
  37. &::before {
  38. position: absolute;
  39. top: 0;
  40. bottom: -1px;
  41. width: 30px;
  42. pointer-events: none;
  43. content: '';
  44. transition: box-shadow var(--animate-duration) linear;
  45. }
  46. }
  47. & .ld-table-right-fixed-shadow {
  48. &::before {
  49. left: 0;
  50. transform: translateX(-100%);
  51. }
  52. }
  53. & .ld-table-left-fixed-shadow {
  54. &::before {
  55. right: 0;
  56. transform: translateX(100%);
  57. }
  58. }
  59. & .ld-table-right-fixed-shadow ~ .ld-table-right-fixed-shadow {
  60. &::before {
  61. display: none;
  62. }
  63. }
  64. & .ld-table-left-fixed-shadow:has(~ .ld-table-left-fixed-shadow) {
  65. &::before {
  66. display: none;
  67. }
  68. }
  69. .ld-table-header-sticky {
  70. position: sticky;
  71. top: 0;
  72. z-index: 5;
  73. width: 100%;
  74. overflow: hidden;
  75. border-start-start-radius: var(--border-radius);
  76. border-start-end-radius: var(--border-radius);
  77. }
  78. .ld-table-body-wrapper {
  79. width: 100%;
  80. overflow-x: auto;
  81. overflow-y: hidden;
  82. & .ld-table {
  83. border-top: 0;
  84. }
  85. }
  86. .ld-table-body-tr {
  87. &:hover {
  88. & td {
  89. background-color: var(--background-color);
  90. }
  91. }
  92. & td {
  93. position: relative;
  94. min-width: 0;
  95. padding: 16px;
  96. overflow-wrap: anywhere;
  97. background-color: var(--layout-background-color);
  98. border-inline-end: 1px solid var(--border-color-light);
  99. border-bottom: 1px solid var(--border-color-light);
  100. transition: background 0.2s, border-color 0.2s;
  101. }
  102. }
  103. .ld-table-enabled-right-fixed-shadow {
  104. & .ld-table-right-fixed-shadow {
  105. &::before {
  106. box-shadow: -10px 0 8px -6px rgb(0 0 0 / 10%) inset;
  107. }
  108. }
  109. }
  110. .ld-table-enabled-left-fixed-shadow {
  111. & .ld-table-left-fixed-shadow:not(:has(+ .ld-table-left-fixed-shadow)) {
  112. border-inline-end-color: transparent;
  113. }
  114. & .ld-table-left-fixed-shadow {
  115. &::before {
  116. box-shadow: 10px 0 8px -6px rgb(0 0 0 / 10%) inset;
  117. }
  118. }
  119. }
  120. .ld-table-fixed-right,
  121. .ld-table-fixed-left {
  122. position: sticky !important;
  123. z-index: 4;
  124. }
  125. .ld-table-head {
  126. text-align: center;
  127. }
  128. .ld-table-tr-highlight {
  129. --border-color-light: --primary-color-light;
  130. & td {
  131. background-color: var(--primary-color-light) !important;
  132. }
  133. }
  134. .ld-table-pagination {
  135. display: flex;
  136. width: 100%;
  137. margin-top: 16px;
  138. }
  139. .ld-table-head-th {
  140. position: relative;
  141. min-width: 0;
  142. padding: 16px;
  143. margin: 0;
  144. font-weight: 600;
  145. color: rgb(0 0 0 / 88%);
  146. text-align: center;
  147. overflow-wrap: anywhere;
  148. list-style: none;
  149. background-color: var(--table-header-color);
  150. border-inline-end: 1px solid var(--border-color-light);
  151. border-bottom: 1px solid var(--border-color-light);
  152. transition: background 0.2s ease;
  153. &:first-child {
  154. border-start-start-radius: var(--border-radius);
  155. }
  156. &:last-child {
  157. border-start-end-radius: var(--border-radius);
  158. }
  159. }
  160. .ld-table-head-th-info {
  161. display: flex;
  162. align-items: center;
  163. justify-content: center;
  164. width: 100%;
  165. height: 100%;
  166. }
  167. .ld-table-head-sort-group {
  168. display: flex;
  169. flex-direction: column;
  170. margin-left: 4px;
  171. font-size: 12px;
  172. color: var(--tip-font-color);
  173. cursor: pointer;
  174. }
  175. .ld-table-head-sort-active {
  176. color: var(--primary-color);
  177. }
  178. .ld-table-preview-transform {
  179. transform: translate3d(-5vw, -5vh, 0) !important;
  180. }
  181. .ld-table-resizer {
  182. position: absolute;
  183. top: 0;
  184. right: 0;
  185. width: 5px;
  186. height: 100%;
  187. touch-action: none;
  188. cursor: col-resize;
  189. user-select: none;
  190. background: var(--primary-color);
  191. opacity: 0;
  192. &:hover {
  193. opacity: 0.4;
  194. }
  195. }
  196. .ld-table-resizing {
  197. opacity: 0.4;
  198. }
  199. .ld-table-tr-preview {
  200. & td {
  201. &:first-child {
  202. border-left: 1px solid var(--border-color) !important;
  203. }
  204. }
  205. &:hover {
  206. & td {
  207. background-color: var(--layout-background-color);
  208. }
  209. }
  210. }