tables.css

Same filename in other branches
  1. 9 core/themes/seven/css/components/tables.css
  2. 9 core/themes/claro/css/components/tables.css
  3. 8.9.x core/themes/seven/css/components/tables.css
  4. 8.9.x core/themes/claro/css/components/tables.css
  5. 10 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. vertical-align: top;
  29. color: var(--color-text);
  30. background: var(--color-gray-050);
  31. line-height: 1.25rem; /* 20px */
  32. }
  33. /* The actual sort link. */
  34. .sortable-heading {
  35. padding: 0 var(--space-m);
  36. }
  37. .sortable-heading > a {
  38. display: block;
  39. padding-block: var(--space-xs);
  40. padding-inline: 0 1.5rem;
  41. -webkit-text-decoration: none;
  42. text-decoration: none;
  43. color: inherit;
  44. }
  45. .sortable-heading > a:focus,
  46. .sortable-heading > a:hover {
  47. -webkit-text-decoration: none;
  48. text-decoration: none;
  49. }
  50. .sortable-heading > a:focus::before,
  51. .sortable-heading > a:hover::before {
  52. border-color: inherit;
  53. }
  54. .sortable-heading > a:focus::after,
  55. .sortable-heading > a:hover::after {
  56. opacity: 1;
  57. }
  58. .sortable-heading > a::before {
  59. position: absolute;
  60. z-index: 0;
  61. inset-block-start: 0;
  62. inset-inline-end: 1rem;
  63. inset-block-end: 0;
  64. inset-inline-start: 1rem;
  65. display: block;
  66. content: "";
  67. border-bottom: 0.125rem solid transparent;
  68. }
  69. .sortable-heading > a::after {
  70. position: absolute;
  71. inset-block-start: 50%;
  72. inset-inline-end: 1rem;
  73. width: 0.875rem;
  74. height: 1rem;
  75. margin-block-start: -0.5rem;
  76. content: "";
  77. opacity: 0.5;
  78. 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%;
  79. background-size: contain;
  80. }
  81. [dir="rtl"] :is(.sortable-heading > a::after) {
  82. /* Horizontally flip the element. */
  83. transform: scaleX(-1);
  84. 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");
  85. }
  86. @media (forced-colors: active) {
  87. [dir="rtl"] :is(.sortable-heading > a::after) {
  88. -webkit-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%;
  89. 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%;
  90. }
  91. }
  92. @media (forced-colors: active) {
  93. .sortable-heading > a::after {
  94. opacity: 1;
  95. background: linktext;
  96. -webkit-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%;
  97. 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%;
  98. }
  99. }
  100. .sortable-heading.is-active > a {
  101. color: var(--color-absolutezero);
  102. }
  103. .sortable-heading.is-active > a::before {
  104. border-bottom: 0.1875rem solid var(--color-absolutezero);
  105. }
  106. .sortable-heading.is-active > a::after {
  107. content: none;
  108. }
  109. tr {
  110. border-bottom: 0.0625rem solid var(--color-gray-200);
  111. }
  112. tr:hover,
  113. tr:focus-within {
  114. color: var(--color-text);
  115. background: var(--color-bgblue-hover);
  116. }
  117. tr.color-warning:hover,
  118. tr.color-warning:focus {
  119. color: var(--color-text);
  120. background: #fdf8ed;
  121. }
  122. tr.color-error:hover,
  123. tr.color-error:focus {
  124. color: var(--color-text);
  125. background: #fcf4f2;
  126. }
  127. tr,
  128. .draggable-table.tabledrag-disabled tr {
  129. color: var(--color-text);
  130. background: var(--color-white);
  131. }
  132. thead tr {
  133. border: 0;
  134. }
  135. td {
  136. box-sizing: border-box;
  137. height: 4rem;
  138. padding: var(--space-xs) var(--space-m);
  139. text-align: start;
  140. vertical-align: top;
  141. }
  142. td .item-list ul {
  143. margin: 0;
  144. }
  145. td.is-active {
  146. background: none;
  147. }
  148. /**
  149. * Target every .form-element input that parent is a form-item of a table cell.
  150. * This ignores the filter format select of the textarea editor.
  151. */
  152. td > .form-item > .form-element,
  153. td > .ajax-new-content > .form-item > .form-element,
  154. td > .form-item > .claro-autocomplete,
  155. td > .form-item > .claro-autocomplete > .form-element,
  156. td > .ajax-new-content > .form-item > .claro-autocomplete,
  157. td > .ajax-new-content > .form-item > .claro-autocomplete > .form-element {
  158. width: 100%;
  159. }
  160. td > .form-item > .form-element--type-select,
  161. td > .ajax-new-content > .form-item > .form-element--type-select {
  162. width: max-content;
  163. min-width: 100%;
  164. }
  165. /* Win over table-file-multiple-widget. */
  166. th.is-disabled.is-disabled {
  167. color: var(--input--disabled-fg-color);
  168. }
  169. /* Force browsers to calculate the width of a 'select all' element. */
  170. th.select-all {
  171. width: 1px;
  172. }
  173. /**
  174. * Captions.
  175. */
  176. .caption {
  177. margin-block-end: 1.25rem; /* 20px */
  178. }
  179. tfoot {
  180. font-weight: bold;
  181. }
  182. tfoot tr:last-child {
  183. border-bottom: 0;
  184. }
  185. tfoot tr:first-child td {
  186. border-top: 0.0625rem solid var(--color-gray-500);
  187. }
  188. /**
  189. * Responsive table cells.
  190. */
  191. th.priority-low,
  192. th.priority-medium,
  193. td.priority-low,
  194. td.priority-medium {
  195. display: none;
  196. }
  197. @media screen and (min-width: 38em) {
  198. th.priority-medium,
  199. td.priority-medium {
  200. display: table-cell;
  201. }
  202. }
  203. @media screen and (min-width: 60em) {
  204. th.priority-low,
  205. td.priority-low {
  206. display: table-cell;
  207. }
  208. }
  209. .tabledrag-toggle-weight-wrapper {
  210. margin-block-start: var(--space-l);
  211. line-height: calc(28rem / 16);
  212. }
  213. .tabledrag-toggle-weight-wrapper + table,
  214. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  215. margin-block-start: 0;
  216. }

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