tables.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. text-align: left; /* LTR */
  17. padding: 10px 12px;
  18. }
  19. [dir="rtl"] th {
  20. text-align: right;
  21. }
  22. thead th {
  23. background: #f5f5f2;
  24. border: solid #bfbfba;
  25. border-width: 1px 0;
  26. color: #333;
  27. text-transform: uppercase;
  28. }
  29. tr {
  30. border-bottom: 1px solid #e6e4df;
  31. padding: 0.1em 0.6em;
  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 <th> */
  68. th > a:after {
  69. content: '';
  70. display: block;
  71. position: absolute;
  72. top: 0;
  73. bottom: -10px; /* 1. */
  74. left: 0;
  75. right: 0;
  76. border-bottom: 2px solid transparent;
  77. -webkit-transition: all 0.1s;
  78. transition: all 0.1s;
  79. }
  80. th.is-active > a {
  81. color: #004875;
  82. }
  83. th.is-active img {
  84. position: absolute;
  85. right: 0; /* LTR */
  86. top: 50%;
  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. color: #008ee6;
  100. text-decoration: none;
  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' <th> 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. }