tables.css

Same filename and directory in other branches
  1. 10 core/themes/claro/css/components/tables.css
  2. 9 core/themes/seven/css/components/tables.css
  3. 9 core/themes/claro/css/components/tables.css
  4. 8.9.x core/themes/seven/css/components/tables.css
  5. 8.9.x core/themes/claro/css/components/tables.css

Claro styles for Tables.

File

core/themes/claro/css/components/tables.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Claro styles for Tables.
  10. */
  11. table {
  12. width: 100%;
  13. margin-block: var(--space-l);
  14. border-collapse: collapse;
  15. }
  16. .sticky-header {
  17. min-width: 0;
  18. }
  19. caption {
  20. text-align: start;
  21. }
  22. th {
  23. position: relative;
  24. box-sizing: border-box;
  25. height: var(--space-xl);
  26. padding: var(--space-xs) var(--space-m);
  27. text-align: start;
  28. color: var(--color-text);
  29. background: var(--color-gray-050);
  30. line-height: 1.25rem; /* 20px */
  31. }
  32. /* The actual sort link. */
  33. .sortable-heading {
  34. padding: 0 var(--space-m);
  35. }
  36. .sortable-heading > a {
  37. display: block;
  38. padding-block: var(--space-xs);
  39. padding-inline: 0 1.5rem;
  40. -webkit-text-decoration: none;
  41. text-decoration: none;
  42. color: inherit;
  43. }
  44. :is(.sortable-heading > a):focus,
  45. :is(.sortable-heading > a):hover {
  46. -webkit-text-decoration: none;
  47. text-decoration: none;
  48. }
  49. :is(:is(.sortable-heading > a):focus, :is(.sortable-heading > a):hover)::before {
  50. border-color: inherit;
  51. }
  52. :is(:is(.sortable-heading > a):focus, :is(.sortable-heading > a):hover)::after {
  53. opacity: 1;
  54. }
  55. :is(.sortable-heading > a)::before {
  56. position: absolute;
  57. z-index: 0;
  58. inset-block-start: 0;
  59. inset-inline-end: 1rem;
  60. inset-block-end: 0;
  61. inset-inline-start: 1rem;
  62. display: block;
  63. content: "";
  64. border-bottom: 0.125rem solid transparent;
  65. }
  66. :is(.sortable-heading > a)::after {
  67. position: absolute;
  68. inset-block-start: 50%;
  69. inset-inline-end: 1rem;
  70. width: 0.875rem;
  71. height: 1rem;
  72. margin-block-start: -0.5rem;
  73. content: "";
  74. opacity: 0.5;
  75. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  76. background-size: contain;
  77. }
  78. [dir="rtl"] :is(:is(.sortable-heading > a)::after) {
  79. /* Horizontally flip the element. */
  80. transform: scaleX(-1);
  81. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e");
  82. }
  83. @media (forced-colors: active) {
  84. [dir="rtl"] :is(:is(.sortable-heading > a)::after) {
  85. mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  86. }
  87. }
  88. @media (forced-colors: active) {
  89. :is(.sortable-heading > a)::after {
  90. opacity: 1;
  91. background: linktext;
  92. mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M1.75.25v1.5h10.5V.25zm0 3v1.5h7.5v-1.5zm0 3v1.5h4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  93. }
  94. }
  95. .sortable-heading.is-active > a {
  96. color: var(--color-absolutezero);
  97. }
  98. :is(.sortable-heading.is-active > a)::before {
  99. border-bottom: 0.1875rem solid var(--color-absolutezero);
  100. }
  101. :is(.sortable-heading.is-active > a)::after {
  102. content: none;
  103. }
  104. tr {
  105. border-bottom: 0.0625rem solid var(--color-gray-200);
  106. }
  107. tr:hover,
  108. tr:focus-within {
  109. color: var(--color-text);
  110. background: var(--color-bgblue-hover);
  111. }
  112. tr.color-warning:hover,
  113. tr.color-warning:focus {
  114. color: var(--color-text);
  115. background: #fdf8ed;
  116. }
  117. tr.color-error:hover,
  118. tr.color-error:focus {
  119. color: var(--color-text);
  120. background: #fcf4f2;
  121. }
  122. tr,
  123. .draggable-table.tabledrag-disabled tr {
  124. color: var(--color-text);
  125. background: var(--color-white);
  126. }
  127. thead tr {
  128. border: 0;
  129. }
  130. td {
  131. box-sizing: border-box;
  132. height: 4rem;
  133. padding: var(--space-xs) var(--space-m);
  134. text-align: start;
  135. }
  136. td .item-list ul {
  137. margin: 0;
  138. }
  139. td.is-active {
  140. background: none;
  141. }
  142. /**
  143. * Target every .form-element input that parent is a form-item of a table cell.
  144. * This ignores the filter format select of the textarea editor.
  145. */
  146. td > .form-item {
  147. display: flex;
  148. align-items: center;
  149. }
  150. td > .form-item > .form-item__prefix {
  151. margin-inline-end: var(--space-xs);
  152. white-space: nowrap;
  153. }
  154. td > .form-item > .form-item__suffix {
  155. margin-inline-start: var(--space-xs);
  156. white-space: nowrap;
  157. }
  158. td > .form-item > .form-element,
  159. td > .ajax-new-content > .form-item > .form-element,
  160. td > .form-item > .claro-autocomplete,
  161. td > .form-item > .claro-autocomplete > .form-element,
  162. td > .ajax-new-content > .form-item > .claro-autocomplete,
  163. td > .ajax-new-content > .form-item > .claro-autocomplete > .form-element {
  164. width: 100%;
  165. }
  166. td > .form-item > .form-element--type-select,
  167. td > .ajax-new-content > .form-item > .form-element--type-select {
  168. width: max-content;
  169. min-width: 100%;
  170. }
  171. /* Win over table-file-multiple-widget. */
  172. th.is-disabled.is-disabled {
  173. color: var(--input--disabled-fg-color);
  174. }
  175. /* Force browsers to calculate the width of a 'select all' element. */
  176. th.select-all {
  177. width: 1px;
  178. }
  179. /**
  180. * Captions.
  181. */
  182. .caption {
  183. margin-block-end: 1.25rem; /* 20px */
  184. }
  185. tfoot {
  186. font-weight: bold;
  187. }
  188. :is(tfoot tr):last-child {
  189. border-bottom: 0;
  190. }
  191. :is(tfoot tr):first-child td {
  192. border-top: 0.0625rem solid var(--color-gray-500);
  193. }
  194. /**
  195. * Responsive table cells.
  196. */
  197. th.priority-low,
  198. th.priority-medium,
  199. td.priority-low,
  200. td.priority-medium {
  201. display: none;
  202. }
  203. @media screen and (min-width: 38em) {
  204. th.priority-medium,
  205. td.priority-medium {
  206. display: table-cell;
  207. }
  208. }
  209. @media screen and (min-width: 60em) {
  210. th.priority-low,
  211. td.priority-low {
  212. display: table-cell;
  213. }
  214. }
  215. .tabledrag-toggle-weight-wrapper {
  216. margin-block-start: var(--space-l);
  217. line-height: calc(28rem / 16);
  218. }
  219. .tabledrag-toggle-weight-wrapper + table,
  220. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  221. margin-block-start: 0;
  222. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.