You are here

tables.css in Drupal 10

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-top: var(--space-l);
  14. margin-bottom: var(--space-l);
  15. border-collapse: collapse;
  16. }
  17. .sticky-header {
  18. min-width: 0;
  19. }
  20. caption {
  21. text-align: left; /* LTR */
  22. }
  23. [dir="rtl"] caption {
  24. text-align: right;
  25. }
  26. th {
  27. position: relative;
  28. box-sizing: border-box;
  29. height: var(--space-xl);
  30. padding: var(--space-xs) var(--space-m);
  31. text-align: left; /* LTR */
  32. color: var(--color-text);
  33. background: var(--color-gray-050);
  34. line-height: 1.25rem; /* 20px */
  35. }
  36. [dir="rtl"] th {
  37. text-align: right;
  38. }
  39. /**
  40. * Table sort.
  41. */
  42. /* Table head cell containing sort link. */
  43. .sortable-heading {
  44. padding: 0 var(--space-m);
  45. }
  46. /* The actual sort link. */
  47. .sortable-heading > a {
  48. display: block;
  49. padding: var(--space-xs) 1.5rem var(--space-xs) 0; /* LTR */
  50. text-decoration: none;
  51. color: inherit;
  52. }
  53. [dir="rtl"] .sortable-heading > a {
  54. padding-right: 0;
  55. padding-left: 1.5rem;
  56. }
  57. .sortable-heading > a::before {
  58. position: absolute;
  59. z-index: 0;
  60. top: 0;
  61. right: 1rem;
  62. bottom: 0;
  63. left: 1rem;
  64. display: block;
  65. content: "";
  66. border-bottom: 0.125rem solid transparent;
  67. }
  68. /* stylelint-disable-next-line selector-type-no-unknown */
  69. _:-ms-fullscreen, /* Only IE 11 */
  70. .sortable-heading > a::before {
  71. top: auto;
  72. height: 100%;
  73. }
  74. .sortable-heading > a::after {
  75. position: absolute;
  76. top: 50%;
  77. right: 1rem;
  78. width: 0.875rem;
  79. height: 1rem;
  80. margin-top: -0.5rem;
  81. content: "";
  82. opacity: 0.5;
  83. 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%;
  84. background-size: contain
  85. }
  86. @media (forced-colors: active) {
  87. .sortable-heading > a::after {
  88. opacity: 1;
  89. background: linktext;
  90. -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%;
  91. 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%
  92. }
  93. }
  94. /* stylelint-disable-next-line selector-type-no-unknown */
  95. _:-ms-fullscreen, /* Only IE 11 */
  96. .sortable-heading > a::after {
  97. position: static;
  98. float: right;
  99. margin-top: 0.125rem; /* 2px */
  100. margin-right: -1.5rem; /* -24px */
  101. }
  102. [dir="rtl"] .sortable-heading > a::after {
  103. right: auto;
  104. left: 1rem;
  105. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M12.25.25v1.5H1.75V.25zm0 3v1.5h-7.5v-1.5zm0 3v1.5h-4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e")
  106. }
  107. @media (forced-colors: active) {
  108. [dir="rtl"] .sortable-heading > a::after {
  109. background: linktext;
  110. -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M12.25.25v1.5H1.75V.25zm0 3v1.5h-7.5v-1.5zm0 3v1.5h-4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%;
  111. mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3e%3cpath d='M12.25.25v1.5H1.75V.25zm0 3v1.5h-7.5v-1.5zm0 3v1.5h-4.5v-1.5z' fill='%23000f33'/%3e%3c/svg%3e") no-repeat 50% 50%
  112. }
  113. }
  114. /* stylelint-disable-next-line selector-type-no-unknown */
  115. _:-ms-fullscreen, /* Only IE 11 */
  116. [dir="rtl"] .sortable-heading > a::after {
  117. float: left;
  118. margin-right: 0;
  119. margin-left: -1.5rem; /* -24px */
  120. }
  121. /* Sortable cell's link focus/hover state. */
  122. .sortable-heading > a:focus,
  123. .sortable-heading > a:hover {
  124. text-decoration: none;
  125. }
  126. .sortable-heading > a:focus::before,
  127. .sortable-heading > a:hover::before {
  128. border-color: inherit;
  129. }
  130. .sortable-heading > a:focus::after,
  131. .sortable-heading > a:hover::after {
  132. opacity: 1;
  133. }
  134. /* Sortable cell's active state. */
  135. .sortable-heading.is-active > a {
  136. color: var(--color-absolutezero);
  137. }
  138. .sortable-heading.is-active > a::before {
  139. border-bottom: 0.1875rem solid var(--color-absolutezero);
  140. }
  141. .sortable-heading.is-active > a::after {
  142. content: none;
  143. }
  144. tr {
  145. border-bottom: 0.0625rem solid var(--color-gray-200);
  146. }
  147. tr,
  148. .draggable-table.tabledrag-disabled tr {
  149. color: var(--color-text);
  150. background: var(--color-white);
  151. }
  152. thead tr {
  153. border: 0;
  154. }
  155. tr:hover,
  156. tr:focus {
  157. color: var(--color-text);
  158. background: var(--color-bgblue-hover);
  159. }
  160. tr.color-warning:hover,
  161. tr.color-warning:focus {
  162. color: var(--color-text);
  163. background: #fdf8ed;
  164. }
  165. tr.color-error:hover,
  166. tr.color-error:focus {
  167. color: var(--color-text);
  168. background: #fcf4f2;
  169. }
  170. td {
  171. box-sizing: border-box;
  172. height: 4rem;
  173. padding: var(--space-xs) var(--space-m);
  174. text-align: left; /* LTR */
  175. }
  176. [dir="rtl"] td {
  177. text-align: right;
  178. }
  179. td .item-list ul {
  180. margin: 0;
  181. }
  182. /* This is required to win over specificity of [dir="rtl"] .item-list ul */
  183. [dir="rtl"] td .item-list ul {
  184. margin: 0;
  185. }
  186. td.is-active {
  187. background: none;
  188. }
  189. /**
  190. * Target every .form-element input that parent is a form-item of a table cell.
  191. * This ignores the filter format select of the textarea editor.
  192. */
  193. td > .form-item > .form-element,
  194. td > .ajax-new-content > .form-item > .form-element {
  195. width: 100%;
  196. }
  197. /* Win over table-file-multiple-widget. */
  198. th.is-disabled.is-disabled {
  199. color: var(--input--disabled-fg-color);
  200. }
  201. /* Force browsers to calculate the width of a 'select all' element. */
  202. th.select-all {
  203. width: 1px;
  204. }
  205. /**
  206. * Captions.
  207. */
  208. .caption {
  209. margin-bottom: 1.25rem; /* 20px */
  210. }
  211. tfoot {
  212. font-weight: bold;
  213. }
  214. tfoot tr:last-child {
  215. border-bottom: 0;
  216. }
  217. tfoot tr:first-child td {
  218. border-top: 0.0625rem solid var(--color-gray-500);
  219. }
  220. /**
  221. * Responsive table cells.
  222. */
  223. th.priority-low,
  224. th.priority-medium,
  225. td.priority-low,
  226. td.priority-medium {
  227. display: none;
  228. }
  229. @media screen and (min-width: 38em) {
  230. th.priority-medium,
  231. td.priority-medium {
  232. display: table-cell;
  233. }
  234. }
  235. @media screen and (min-width: 60em) {
  236. th.priority-low,
  237. td.priority-low {
  238. display: table-cell;
  239. }
  240. }
  241. .tabledrag-toggle-weight-wrapper {
  242. margin-top: var(--space-l);
  243. line-height: calc(28rem / 16);
  244. }
  245. .tabledrag-toggle-weight-wrapper + table,
  246. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  247. margin-top: 0;
  248. }