You are here

tables.css in Drupal 9

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: #222330;
  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='%23222330'/%3e%3c/svg%3e") no-repeat 50% 50%;
  84. background-size: contain;
  85. }
  86. /* stylelint-disable-next-line selector-type-no-unknown */
  87. _:-ms-fullscreen, /* Only IE 11 */
  88. .sortable-heading > a::after {
  89. position: static;
  90. float: right;
  91. margin-top: 0.125rem; /* 2px */
  92. margin-right: -1.5rem; /* -24px */
  93. }
  94. [dir="rtl"] .sortable-heading > a::after {
  95. right: auto;
  96. left: 1rem;
  97. 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='%23222330'/%3e%3c/svg%3e");
  98. }
  99. /* stylelint-disable-next-line selector-type-no-unknown */
  100. _:-ms-fullscreen, /* Only IE 11 */
  101. [dir="rtl"] .sortable-heading > a::after {
  102. float: left;
  103. margin-right: 0;
  104. margin-left: -1.5rem; /* -24px */
  105. }
  106. /* Sortable cell's link focus/hover state. */
  107. .sortable-heading > a:focus,
  108. .sortable-heading > a:hover {
  109. text-decoration: none;
  110. }
  111. .sortable-heading > a:focus::before,
  112. .sortable-heading > a:hover::before {
  113. border-color: inherit;
  114. }
  115. .sortable-heading > a:focus::after,
  116. .sortable-heading > a:hover::after {
  117. opacity: 1;
  118. }
  119. /* Sortable cell's active state. */
  120. .sortable-heading.is-active > a {
  121. color: #003cc5;
  122. }
  123. .sortable-heading.is-active > a::before {
  124. border-bottom: 0.1875rem solid #003cc5;
  125. }
  126. .sortable-heading.is-active > a::after {
  127. content: none;
  128. }
  129. tr {
  130. border-bottom: 0.0625rem solid #d4d4d8;
  131. }
  132. tr,
  133. .draggable-table.tabledrag-disabled tr {
  134. color: #222330;
  135. background: #fff;
  136. }
  137. thead tr {
  138. border: 0;
  139. }
  140. tr:hover,
  141. tr:focus {
  142. color: #222330;
  143. background: #f0f5fd;
  144. }
  145. tr.color-warning:hover,
  146. tr.color-warning:focus {
  147. color: #222330;
  148. background: #fdf8ed;
  149. }
  150. tr.color-error:hover,
  151. tr.color-error:focus {
  152. color: #222330;
  153. background: #fcf4f2;
  154. }
  155. td {
  156. box-sizing: border-box;
  157. height: 4rem;
  158. padding: 0.5rem 1rem;
  159. text-align: left; /* LTR */
  160. }
  161. [dir="rtl"] td {
  162. text-align: right;
  163. }
  164. td .item-list ul {
  165. margin: 0;
  166. }
  167. /* This is required to win over specificity of [dir="rtl"] .item-list ul */
  168. [dir="rtl"] td .item-list ul {
  169. margin: 0;
  170. }
  171. td.is-active {
  172. background: none;
  173. }
  174. /**
  175. * Target every .form-element input that parent is a form-item of a table cell.
  176. * This ignores the filter format select of the textarea editor.
  177. */
  178. td > .form-item > .form-element,
  179. td > .ajax-new-content > .form-item > .form-element {
  180. width: 100%;
  181. }
  182. /* Win over table-file-multiple-widget. */
  183. th.is-disabled.is-disabled {
  184. color: #82828c;
  185. }
  186. /* Force browsers to calculate the width of a 'select all' element. */
  187. th.select-all {
  188. width: 1px;
  189. }
  190. /**
  191. * Captions.
  192. */
  193. .caption {
  194. margin-bottom: 1.25rem; /* 20px */
  195. }
  196. tfoot {
  197. font-weight: bold;
  198. }
  199. tfoot tr:last-child {
  200. border-bottom: 0;
  201. }
  202. tfoot tr:first-child td {
  203. border-top: 0.0625rem solid #8e929c;
  204. }
  205. /**
  206. * Responsive table cells.
  207. */
  208. th.priority-low,
  209. th.priority-medium,
  210. td.priority-low,
  211. td.priority-medium {
  212. display: none;
  213. }
  214. @media screen and (min-width: 38em) {
  215. th.priority-medium,
  216. td.priority-medium {
  217. display: table-cell;
  218. }
  219. }
  220. @media screen and (min-width: 60em) {
  221. th.priority-low,
  222. td.priority-low {
  223. display: table-cell;
  224. }
  225. }
  226. .tabledrag-toggle-weight-wrapper {
  227. margin-top: 1.5rem;
  228. line-height: 1.75rem;
  229. }
  230. .tabledrag-toggle-weight-wrapper + table,
  231. .tabledrag-toggle-weight-wrapper + .tableresponsive-toggle-columns + table {
  232. margin-top: 0;
  233. }