gitea源码

flex-list.css 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .flex-list {
  2. list-style: none;
  3. }
  4. .flex-item {
  5. display: flex;
  6. gap: 8px;
  7. align-items: flex-start;
  8. padding: 10px 0;
  9. }
  10. .flex-item .flex-item-leading {
  11. display: flex;
  12. align-items: flex-start;
  13. }
  14. .flex-item .flex-item-main {
  15. display: flex;
  16. flex-direction: column;
  17. gap: 0.25em;
  18. flex-grow: 1;
  19. flex-basis: 60%; /* avoid wrapping the "flex-item-trailing" too aggressively */
  20. min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */
  21. }
  22. .flex-item-header {
  23. display: flex;
  24. gap: .25rem;
  25. justify-content: space-between;
  26. flex-wrap: wrap;
  27. }
  28. .flex-item a:not(.label, .button):hover {
  29. color: var(--color-primary) !important;
  30. }
  31. .flex-item .flex-item-trailing {
  32. display: flex;
  33. gap: 0.5rem;
  34. align-items: center;
  35. flex-grow: 0;
  36. flex-wrap: wrap;
  37. justify-content: end;
  38. }
  39. .flex-item .flex-item-title {
  40. display: inline-flex;
  41. flex-wrap: wrap;
  42. align-items: center;
  43. /* labels are under effect of this gap here because they are display:contents. Ideally we should make wrapping
  44. of labels work without display: contents and set this to a static value again. */
  45. gap: var(--gap-inline);
  46. max-width: 100%;
  47. color: var(--color-text);
  48. font-size: 16px;
  49. font-weight: var(--font-weight-semibold);
  50. overflow-wrap: anywhere;
  51. min-width: 0;
  52. }
  53. .flex-item .flex-item-title a {
  54. color: var(--color-text);
  55. overflow-wrap: anywhere;
  56. }
  57. .flex-item .flex-item-body {
  58. display: flex;
  59. align-items: center;
  60. flex-wrap: wrap;
  61. gap: .25rem;
  62. color: var(--color-text-light-2);
  63. overflow-wrap: anywhere;
  64. }
  65. .flex-item .flex-item-body a {
  66. color: inherit;
  67. overflow-wrap: anywhere;
  68. }
  69. .flex-list > .flex-item + .flex-item {
  70. border-top: 1px solid var(--color-secondary);
  71. }
  72. /* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly (there might also be some `tw-hidden` siblings).
  73. Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */
  74. .flex-list.flex-space-fitted > .flex-item:first-child,
  75. .ui.segment > .flex-list > .flex-item:first-child {
  76. padding-top: 0;
  77. }
  78. .flex-list.flex-space-fitted > .flex-item:last-child,
  79. .ui.segment > .flex-list > .flex-item:last-child {
  80. padding-bottom: 0;
  81. }
  82. /* If there is a divider besides the flex-list, some padding/margin are not needs */
  83. .divider + .flex-list > .flex-item:first-child {
  84. padding-top: 0;
  85. }
  86. .flex-list + .divider {
  87. margin-top: 0;
  88. }