tables.css

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

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