tables.css

Same filename in this branch
  1. 9 core/themes/claro/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

Seven styles for Tables.

File

core/themes/seven/css/components/tables.css

View source
  1. /**
  2. * @file
  3. * Seven styles for Tables.
  4. */
  5. table {
  6. width: 100%;
  7. margin: 0 0 10px;
  8. border-collapse: collapse;
  9. }
  10. caption {
  11. text-align: left; /* LTR */
  12. }
  13. [dir="rtl"] caption {
  14. text-align: right;
  15. }
  16. th {
  17. padding: 10px 12px;
  18. text-align: left; /* LTR */
  19. }
  20. [dir="rtl"] th {
  21. text-align: right;
  22. }
  23. thead th {
  24. text-transform: uppercase;
  25. color: #333;
  26. border: solid #bfbfba;
  27. border-width: 1px 0;
  28. background: #f5f5f2;
  29. }
  30. tr {
  31. padding: 0.1em 0.6em;
  32. border-bottom: 1px solid #e6e4df;
  33. }
  34. thead > tr {
  35. border-bottom: 1px solid #000;
  36. }
  37. tbody tr:hover,
  38. tbody tr:focus {
  39. background: #f7fcff;
  40. }
  41. /* See colors.css */
  42. tbody tr.color-warning:hover,
  43. tbody tr.color-warning:focus {
  44. background: #fdf8ed;
  45. }
  46. tbody tr.color-error:hover,
  47. tbody tr.color-error:focus {
  48. background: #fcf4f2;
  49. }
  50. table.no-highlight tr.selected td {
  51. background: transparent;
  52. }
  53. td,
  54. th {
  55. vertical-align: middle;
  56. }
  57. td {
  58. padding: 10px 12px;
  59. text-align: left; /* LTR */
  60. }
  61. [dir="rtl"] td {
  62. text-align: right;
  63. }
  64. th > a {
  65. position: relative;
  66. display: block;
  67. }
  68. /* 1. Must match negative bottom padding of the parent */
  69. th > a:after {
  70. position: absolute;
  71. top: 0;
  72. right: 0;
  73. bottom: -10px; /* 1. */
  74. left: 0;
  75. display: block;
  76. content: "";
  77. -webkit-transition: all 0.1s;
  78. transition: all 0.1s;
  79. border-bottom: 2px solid transparent;
  80. }
  81. th.is-active > a {
  82. color: #004875;
  83. }
  84. th.is-active img {
  85. position: absolute;
  86. top: 50%;
  87. right: 0; /* LTR */
  88. }
  89. [dir="rtl"] th.is-active img {
  90. right: auto;
  91. left: 0;
  92. }
  93. th.is-active > a:after {
  94. border-bottom-color: #004875;
  95. }
  96. th > a:hover,
  97. th > a:focus,
  98. th.is-active > a:hover,
  99. th.is-active > a:focus {
  100. text-decoration: none;
  101. color: #008ee6;
  102. }
  103. th > a:hover:after,
  104. th > a:focus:after,
  105. th.is-active > a:hover:after,
  106. th.is-active > a:focus:after {
  107. border-bottom-color: #008ee6;
  108. }
  109. td .item-list ul {
  110. margin: 0;
  111. }
  112. /* This is required to win over specificity of [dir="rtl"] .item-list ul */
  113. [dir="rtl"] td .item-list ul {
  114. margin: 0;
  115. }
  116. td.is-active {
  117. background: none;
  118. }
  119. /* Force browsers to calculate the width of a 'select all' element. */
  120. th.select-all {
  121. width: 1px;
  122. }
  123. /**
  124. * Captions.
  125. */
  126. .caption {
  127. margin-bottom: 1.2em;
  128. }
  129. /**
  130. * Responsive tables.
  131. */
  132. @media screen and (max-width: 37.5em) { /* 600px */
  133. th.priority-low,
  134. td.priority-low,
  135. th.priority-medium,
  136. td.priority-medium {
  137. display: none;
  138. }
  139. }
  140. @media screen and (max-width: 60em) { /* 920px */
  141. th.priority-low,
  142. td.priority-low {
  143. display: none;
  144. }
  145. }
  146. /**
  147. * Target every .form-text input where its parent is a form-item inside a table
  148. * cell.
  149. */
  150. td > .form-item > .form-text,
  151. td > .ajax-new-content > .form-item > .form-text {
  152. width: 100%;
  153. }

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