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

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