You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

segment.css 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /* based on Fomantic UI segment module, with just the parts extracted that we use. If you find any
  2. unused rules here after refactoring, please remove them. */
  3. .ui.segment {
  4. position: relative;
  5. margin: 1rem 0;
  6. padding: 1em;
  7. border-radius: 0.28571429rem;
  8. border: 1px solid var(--color-secondary);
  9. background: var(--color-box-body);
  10. color: var(--color-text);
  11. }
  12. .ui.segment:first-child {
  13. margin-top: 0;
  14. }
  15. .ui.segment:last-child {
  16. margin-bottom: 0;
  17. }
  18. .ui.grid.segment {
  19. margin: 1rem 0;
  20. border-radius: 0.28571429rem;
  21. }
  22. .ui.segment.tab:last-child {
  23. margin-bottom: 1rem;
  24. }
  25. .ui.segments {
  26. flex-direction: column;
  27. position: relative;
  28. margin: 1rem 0;
  29. border: 1px solid var(--color-secondary);
  30. border-radius: 0.28571429rem;
  31. background: var(--color-box-body);
  32. color: var(--color-text);
  33. }
  34. .ui.segments:first-child {
  35. margin-top: 0;
  36. }
  37. .ui.segments:last-child {
  38. margin-bottom: 0;
  39. }
  40. .ui.segments > .segment {
  41. top: 0;
  42. bottom: 0;
  43. border-radius: 0;
  44. margin: 0;
  45. width: auto;
  46. box-shadow: none;
  47. border: none;
  48. border-top: 1px solid var(--color-secondary);
  49. }
  50. .ui.segments:not(.horizontal) > .segment:first-child {
  51. top: 0;
  52. bottom: 0;
  53. border-top: none;
  54. margin-top: 0;
  55. margin-bottom: 0;
  56. border-radius: 0.28571429rem 0.28571429rem 0 0;
  57. }
  58. .ui.segments:not(.horizontal) > .segment:last-child {
  59. top: 0;
  60. bottom: 0;
  61. margin-top: 0;
  62. margin-bottom: 0;
  63. border-radius: 0 0 0.28571429rem 0.28571429rem;
  64. }
  65. .ui.segments:not(.horizontal) > .segment:only-child,
  66. .ui.segments:not(.horizontal) > .segment:has(~ .tw-hidden) { /* workaround issue with :last-child ignoring hidden elements */
  67. border-radius: 0.28571429rem;
  68. }
  69. .ui.segments > .ui.segments {
  70. border-top: 1px solid var(--color-secondary);
  71. margin: 1rem;
  72. }
  73. .ui.segments > .segments:first-child {
  74. border-top: none;
  75. }
  76. .ui.segments > .segment + .segments:not(.horizontal) {
  77. margin-top: 0;
  78. }
  79. .ui.horizontal.segments {
  80. display: flex;
  81. flex-direction: row;
  82. background-color: transparent;
  83. padding: 0;
  84. margin: 1rem 0;
  85. border-radius: 0.28571429rem;
  86. border: 1px solid var(--color-secondary);
  87. }
  88. .ui.horizontal.segments > .segment {
  89. margin: 0;
  90. min-width: 0;
  91. border-radius: 0;
  92. border: none;
  93. box-shadow: none;
  94. border-left: 1px solid var(--color-secondary);
  95. }
  96. .ui.segments > .horizontal.segments:first-child {
  97. border-top: none;
  98. }
  99. .ui.horizontal.segments:not(.stackable) > .segment:first-child {
  100. border-left: none;
  101. }
  102. .ui.horizontal.segments > .segment:first-child {
  103. border-radius: 0.28571429rem 0 0 0.28571429rem;
  104. }
  105. .ui.horizontal.segments > .segment:last-child {
  106. border-radius: 0 0.28571429rem 0.28571429rem 0;
  107. }
  108. .ui.clearing.segment::after {
  109. content: "";
  110. display: block;
  111. clear: both;
  112. }
  113. .ui[class*="left aligned"].segment {
  114. text-align: left;
  115. }
  116. .ui[class*="center aligned"].segment {
  117. text-align: center;
  118. }
  119. .ui.secondary.segment {
  120. background: var(--color-secondary-bg);
  121. color: var(--color-text-light);
  122. }
  123. .ui.attached.segment {
  124. top: 0;
  125. bottom: 0;
  126. border-radius: 0;
  127. margin: 0 -1px;
  128. width: calc(100% + 2px);
  129. max-width: calc(100% + 2px);
  130. box-shadow: none;
  131. border: 1px solid var(--color-secondary);
  132. background: var(--color-box-body);
  133. color: var(--color-text);
  134. }
  135. .ui.attached:not(.message) + .ui.attached.segment:not(.top) {
  136. border-top: none;
  137. }
  138. .ui.attached.segment:has(+ .ui[class*="top attached"].header),
  139. .ui.attached.segment:last-child {
  140. border-radius: 0 0 0.28571429rem 0.28571429rem;
  141. }
  142. .ui[class*="top attached"].segment {
  143. bottom: 0;
  144. margin-bottom: 0;
  145. top: 0;
  146. margin-top: 1rem;
  147. border-radius: 0.28571429rem 0.28571429rem 0 0;
  148. }
  149. .ui.segment[class*="top attached"]:first-child {
  150. margin-top: 0;
  151. }
  152. .ui.segment[class*="bottom attached"] {
  153. bottom: 0;
  154. margin-top: 0;
  155. top: 0;
  156. margin-bottom: 1rem;
  157. border-radius: 0 0 0.28571429rem 0.28571429rem;
  158. }
  159. .ui.segment[class*="bottom attached"]:last-child {
  160. margin-bottom: 1rem;
  161. }
  162. .ui.fitted.segment:not(.horizontally) {
  163. padding-top: 0;
  164. padding-bottom: 0;
  165. }
  166. .ui.fitted.segment:not(.vertically) {
  167. padding-left: 0;
  168. padding-right: 0;
  169. }
  170. .ui.segments .segment,
  171. .ui.segment {
  172. font-size: 1rem;
  173. }
  174. .ui.error.segment {
  175. border-color: var(--color-error-border) !important;
  176. }
  177. .ui.warning.segment {
  178. border-color: var(--color-warning-border) !important;
  179. }