tables.css

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

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

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