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. 11.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. .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. 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. }
  89. }
  90. @media (forced-colors: active) {
  91. .sortable-heading > a::after {
  92. opacity: 1;
  93. background: linktext;
  94. 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%;
  95. }
  96. }
  97. .sortable-heading.is-active > a {
  98. color: var(--color-absolutezero);
  99. }
  100. .sortable-heading.is-active > a::before {
  101. border-bottom: 0.1875rem solid var(--color-absolutezero);
  102. }
  103. .sortable-heading.is-active > a::after {
  104. content: none;
  105. }
  106. tr {
  107. border-bottom: 0.0625rem solid var(--color-gray-200);
  108. }
  109. tr:hover,
  110. tr:focus-within {
  111. color: var(--color-text);
  112. background: var(--color-bgblue-hover);
  113. }
  114. tr.color-warning:hover,
  115. tr.color-warning:focus {
  116. color: var(--color-text);
  117. background: #fdf8ed;
  118. }
  119. tr.color-error:hover,
  120. tr.color-error:focus {
  121. color: var(--color-text);
  122. background: #fcf4f2;
  123. }
  124. tr,
  125. .draggable-table.tabledrag-disabled tr {
  126. color: var(--color-text);
  127. background: var(--color-white);
  128. }
  129. thead tr {
  130. border: 0;
  131. }
  132. td {
  133. box-sizing: border-box;
  134. height: 4rem;
  135. padding: var(--space-xs) var(--space-m);
  136. text-align: start;
  137. }
  138. td .item-list ul {
  139. margin: 0;
  140. }
  141. td.is-active {
  142. background: none;
  143. }
  144. /**
  145. * Target every .form-element input that parent is a form-item of a table cell.
  146. * This ignores the filter format select of the textarea editor.
  147. */
  148. td > .form-item > .form-element,
  149. td > .ajax-new-content > .form-item > .form-element,
  150. td > .form-item > .claro-autocomplete,
  151. td > .form-item > .claro-autocomplete > .form-element,
  152. td > .ajax-new-content > .form-item > .claro-autocomplete,
  153. td > .ajax-new-content > .form-item > .claro-autocomplete > .form-element {
  154. width: 100%;
  155. }
  156. td > .form-item > .form-element--type-select,
  157. td > .ajax-new-content > .form-item > .form-element--type-select {
  158. width: max-content;
  159. min-width: 100%;
  160. }
  161. /* Win over table-file-multiple-widget. */
  162. th.is-disabled.is-disabled {
  163. color: var(--input--disabled-fg-color);
  164. }
  165. /* Force browsers to calculate the width of a 'select all' element. */
  166. th.select-all {
  167. width: 1px;
  168. }
  169. /**
  170. * Captions.
  171. */
  172. .caption {
  173. margin-block-end: 1.25rem; /* 20px */
  174. }
  175. tfoot {
  176. font-weight: bold;
  177. }
  178. tfoot tr:last-child {
  179. border-bottom: 0;
  180. }
  181. tfoot tr:first-child td {
  182. border-top: 0.0625rem solid var(--color-gray-500);
  183. }
  184. /**
  185. * Responsive table cells.
  186. */
  187. th.priority-low,
  188. th.priority-medium,
  189. td.priority-low,
  190. td.priority-medium {
  191. display: none;
  192. }
  193. @media screen and (min-width: 38em) {
  194. th.priority-medium,
  195. td.priority-medium {
  196. display: table-cell;
  197. }
  198. }
  199. @media screen and (min-width: 60em) {
  200. th.priority-low,
  201. td.priority-low {
  202. display: table-cell;
  203. }
  204. }
  205. .tabledrag-toggle-weight-wrapper {
  206. margin-block-start: var(--space-l);
  207. line-height: calc(28rem / 16);
  208. }
  209. .tabledrag-toggle-weight-wrapper + table,
  210. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  211. margin-block-start: 0;
  212. }

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