tables.css

Same filename in this branch
  1. 9 core/themes/seven/css/components/tables.css
Same filename in other branches
  1. 8.9.x core/themes/seven/css/components/tables.css
  2. 8.9.x core/themes/claro/css/components/tables.css
  3. 10 core/themes/claro/css/components/tables.css
  4. 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-top: 1.5rem;
  14. margin-bottom: 1.5rem;
  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: 3rem;
  30. padding: 0.5rem 1rem;
  31. text-align: left; /* LTR */
  32. color: #232429;
  33. background: #f3f4f9;
  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 1rem;
  45. }
  46. /* The actual sort link. */
  47. .sortable-heading > a {
  48. display: block;
  49. padding: 0.5rem 1.5rem 0.5rem 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: #003ecc;
  137. }
  138. .sortable-heading.is-active > a::before {
  139. border-bottom: 0.1875rem solid #003ecc;
  140. }
  141. .sortable-heading.is-active > a::after {
  142. content: none;
  143. }
  144. tr {
  145. border-bottom: 0.0625rem solid #d3d4d9;
  146. }
  147. tr,
  148. .draggable-table.tabledrag-disabled tr {
  149. color: #232429;
  150. background: #fff;
  151. }
  152. thead tr {
  153. border: 0;
  154. }
  155. tr:hover,
  156. tr:focus {
  157. color: #232429;
  158. background: #f5f8ff;
  159. }
  160. tr.color-warning:hover,
  161. tr.color-warning:focus {
  162. color: #232429;
  163. background: #fdf8ed;
  164. }
  165. tr.color-error:hover,
  166. tr.color-error:focus {
  167. color: #232429;
  168. background: #fcf4f2;
  169. }
  170. td {
  171. box-sizing: border-box;
  172. height: 4rem;
  173. padding: 0.5rem 1rem;
  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. td > .form-item > .form-element--type-select,
  198. td > .ajax-new-content > .form-item > .form-element--type-select {
  199. width: auto;
  200. }
  201. @supports (min-width: max-content) {
  202. td > .form-item > .form-element--type-select,
  203. td > .ajax-new-content > .form-item > .form-element--type-select {
  204. width: max-content;
  205. min-width: 100%;
  206. }
  207. }
  208. /* Win over table-file-multiple-widget. */
  209. th.is-disabled.is-disabled {
  210. color: #828388;
  211. }
  212. /* Force browsers to calculate the width of a 'select all' element. */
  213. th.select-all {
  214. width: 1px;
  215. }
  216. /**
  217. * Captions.
  218. */
  219. .caption {
  220. margin-bottom: 1.25rem; /* 20px */
  221. }
  222. tfoot {
  223. font-weight: bold;
  224. }
  225. tfoot tr:last-child {
  226. border-bottom: 0;
  227. }
  228. tfoot tr:first-child td {
  229. border-top: 0.0625rem solid #919297;
  230. }
  231. /**
  232. * Responsive table cells.
  233. */
  234. th.priority-low,
  235. th.priority-medium,
  236. td.priority-low,
  237. td.priority-medium {
  238. display: none;
  239. }
  240. @media screen and (min-width: 38em) {
  241. th.priority-medium,
  242. td.priority-medium {
  243. display: table-cell;
  244. }
  245. }
  246. @media screen and (min-width: 60em) {
  247. th.priority-low,
  248. td.priority-low {
  249. display: table-cell;
  250. }
  251. }
  252. .tabledrag-toggle-weight-wrapper {
  253. margin-top: 1.5rem;
  254. line-height: 1.75rem;
  255. }
  256. .tabledrag-toggle-weight-wrapper + table,
  257. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  258. margin-top: 0;
  259. }

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