index.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @import './customize.less';
  4. @list-prefix-cls: ~'@{ant-prefix}-list';
  5. .@{list-prefix-cls} {
  6. .reset-component();
  7. position: relative;
  8. * {
  9. outline: none;
  10. }
  11. &-pagination {
  12. margin-top: @margin-lg;
  13. text-align: right;
  14. // https://github.com/ant-design/ant-design/issues/20037
  15. .@{ant-prefix}-pagination-options {
  16. text-align: left;
  17. }
  18. }
  19. &-more {
  20. margin-top: @margin-sm;
  21. text-align: center;
  22. button {
  23. padding-right: 32px;
  24. padding-left: 32px;
  25. }
  26. }
  27. &-spin {
  28. min-height: 40px;
  29. text-align: center;
  30. }
  31. &-empty-text {
  32. padding: @list-empty-text-padding;
  33. color: @disabled-color;
  34. font-size: @font-size-base;
  35. text-align: center;
  36. }
  37. &-items {
  38. margin: 0;
  39. padding: 0;
  40. list-style: none;
  41. }
  42. &-item {
  43. display: flex;
  44. align-items: center;
  45. justify-content: space-between;
  46. padding: @list-item-padding;
  47. color: @text-color;
  48. &-meta {
  49. display: flex;
  50. flex: 1;
  51. align-items: flex-start;
  52. max-width: 100%;
  53. &-avatar {
  54. margin-right: @list-item-meta-avatar-margin-right;
  55. }
  56. &-content {
  57. flex: 1 0;
  58. width: 0;
  59. color: @text-color;
  60. }
  61. &-title {
  62. margin-bottom: 4px;
  63. color: @text-color;
  64. font-size: @font-size-base;
  65. line-height: @line-height-base;
  66. > a {
  67. color: @text-color;
  68. transition: all 0.3s;
  69. &:hover {
  70. color: @primary-color;
  71. }
  72. }
  73. }
  74. &-description {
  75. color: @text-color-secondary;
  76. font-size: @list-item-meta-description-font-size;
  77. line-height: @line-height-base;
  78. }
  79. }
  80. &-action {
  81. flex: 0 0 auto;
  82. margin-left: 48px;
  83. padding: 0;
  84. font-size: 0;
  85. list-style: none;
  86. & > li {
  87. position: relative;
  88. display: inline-block;
  89. padding: 0 @padding-xs;
  90. color: @text-color-secondary;
  91. font-size: @font-size-base;
  92. line-height: @line-height-base;
  93. text-align: center;
  94. &:first-child {
  95. padding-left: 0;
  96. }
  97. }
  98. &-split {
  99. position: absolute;
  100. top: 50%;
  101. right: 0;
  102. width: 1px;
  103. height: 14px;
  104. margin-top: -7px;
  105. background-color: @border-color-split;
  106. }
  107. }
  108. }
  109. &-header {
  110. background: @list-header-background;
  111. }
  112. &-footer {
  113. background: @list-footer-background;
  114. }
  115. &-header,
  116. &-footer {
  117. padding-top: @padding-sm;
  118. padding-bottom: @padding-sm;
  119. }
  120. &-empty {
  121. padding: @padding-md 0;
  122. color: @text-color-secondary;
  123. font-size: 12px;
  124. text-align: center;
  125. }
  126. &-split &-item {
  127. border-bottom: 1px solid @border-color-split;
  128. &:last-child {
  129. border-bottom: none;
  130. }
  131. }
  132. &-split &-header {
  133. border-bottom: 1px solid @border-color-split;
  134. }
  135. &-split&-empty &-footer {
  136. border-top: 1px solid @border-color-split;
  137. }
  138. &-loading &-spin-nested-loading {
  139. min-height: 32px;
  140. }
  141. &-split&-something-after-last-item .@{ant-prefix}-spin-container > &-items > &-item:last-child {
  142. border-bottom: 1px solid @border-color-split;
  143. }
  144. &-lg &-item {
  145. padding: @list-item-padding-lg;
  146. }
  147. &-sm &-item {
  148. padding: @list-item-padding-sm;
  149. }
  150. &-vertical &-item {
  151. align-items: initial;
  152. &-main {
  153. display: block;
  154. flex: 1;
  155. }
  156. &-extra {
  157. margin-left: 40px;
  158. }
  159. &-meta {
  160. margin-bottom: @list-item-meta-margin-bottom;
  161. &-title {
  162. margin-bottom: @list-item-meta-title-margin-bottom;
  163. color: @heading-color;
  164. font-size: @font-size-lg;
  165. line-height: 24px;
  166. }
  167. }
  168. &-action {
  169. margin-top: @padding-md;
  170. margin-left: auto;
  171. > li {
  172. padding: 0 @padding-md;
  173. &:first-child {
  174. padding-left: 0;
  175. }
  176. }
  177. }
  178. }
  179. &-grid .@{ant-prefix}-col > &-item {
  180. display: block;
  181. max-width: 100%;
  182. margin-bottom: @margin-md;
  183. padding-top: 0;
  184. padding-bottom: 0;
  185. border-bottom: none;
  186. }
  187. // ============================ without flex ============================
  188. &-item-no-flex {
  189. display: block;
  190. }
  191. // Horizontal
  192. &:not(.@{list-prefix-cls}-vertical) {
  193. .@{list-prefix-cls}-item-no-flex {
  194. .@{list-prefix-cls}-item-action {
  195. float: right;
  196. }
  197. }
  198. }
  199. }
  200. @import './bordered';
  201. @import './responsive';
  202. @import './rtl';