skeleton.css 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /* Some sane resets. */
  2. html {
  3. height: 100%;
  4. }
  5. body {
  6. margin: 0;
  7. min-height: 100%;
  8. }
  9. /* All the flexbox magic! */
  10. body,
  11. .sb-announcement,
  12. .sb-content,
  13. .sb-main,
  14. .sb-container,
  15. .sb-container__inner,
  16. .sb-article-container,
  17. .sb-footer-content,
  18. .sb-header,
  19. .sb-header-secondary,
  20. .sb-footer {
  21. display: flex;
  22. }
  23. /* These order things vertically */
  24. body,
  25. .sb-main,
  26. .sb-article-container {
  27. flex-direction: column;
  28. }
  29. /* Put elements in the center */
  30. .sb-header,
  31. .sb-header-secondary,
  32. .sb-container,
  33. .sb-content,
  34. .sb-footer,
  35. .sb-footer-content {
  36. justify-content: center;
  37. }
  38. /* Put elements at the ends */
  39. .sb-article-container {
  40. justify-content: space-between;
  41. }
  42. /* These elements grow. */
  43. .sb-main,
  44. .sb-content,
  45. .sb-container,
  46. article {
  47. flex-grow: 1;
  48. }
  49. /* Because padding making this wider is not fun */
  50. article {
  51. box-sizing: border-box;
  52. }
  53. /* The announcements element should never be wider than the page. */
  54. .sb-announcement {
  55. max-width: 100%;
  56. }
  57. .sb-sidebar-primary,
  58. .sb-sidebar-secondary {
  59. flex-shrink: 0;
  60. width: 17rem;
  61. }
  62. .sb-announcement__inner {
  63. justify-content: center;
  64. box-sizing: border-box;
  65. height: 3rem;
  66. overflow-x: auto;
  67. white-space: nowrap;
  68. }
  69. /* Sidebars, with checkbox-based toggle */
  70. .sb-sidebar-primary,
  71. .sb-sidebar-secondary {
  72. position: fixed;
  73. height: 100%;
  74. top: 0;
  75. }
  76. .sb-sidebar-primary {
  77. left: -17rem;
  78. transition: left 250ms ease-in-out;
  79. }
  80. .sb-sidebar-secondary {
  81. right: -17rem;
  82. transition: right 250ms ease-in-out;
  83. }
  84. .sb-sidebar-toggle {
  85. display: none;
  86. }
  87. .sb-sidebar-overlay {
  88. position: fixed;
  89. top: 0;
  90. width: 0;
  91. height: 0;
  92. transition: width 0ms ease 250ms, height 0ms ease 250ms, opacity 250ms ease;
  93. opacity: 0;
  94. background-color: rgba(0, 0, 0, 0.54);
  95. }
  96. #sb-sidebar-toggle--primary:checked
  97. ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--primary"],
  98. #sb-sidebar-toggle--secondary:checked
  99. ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--secondary"] {
  100. width: 100%;
  101. height: 100%;
  102. opacity: 1;
  103. transition: width 0ms ease, height 0ms ease, opacity 250ms ease;
  104. }
  105. #sb-sidebar-toggle--primary:checked ~ .sb-container .sb-sidebar-primary {
  106. left: 0;
  107. }
  108. #sb-sidebar-toggle--secondary:checked ~ .sb-container .sb-sidebar-secondary {
  109. right: 0;
  110. }
  111. /* Full-width mode */
  112. .drop-secondary-sidebar-for-full-width-content
  113. .hide-when-secondary-sidebar-shown {
  114. display: none !important;
  115. }
  116. .drop-secondary-sidebar-for-full-width-content .sb-sidebar-secondary {
  117. display: none !important;
  118. }
  119. /* Mobile views */
  120. .sb-page-width {
  121. width: 100%;
  122. }
  123. .sb-article-container,
  124. .sb-footer-content__inner,
  125. .drop-secondary-sidebar-for-full-width-content .sb-article,
  126. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  127. width: 100vw;
  128. }
  129. .sb-article,
  130. .match-content-width {
  131. padding: 0 1rem;
  132. box-sizing: border-box;
  133. }
  134. @media (min-width: 32rem) {
  135. .sb-article,
  136. .match-content-width {
  137. padding: 0 2rem;
  138. }
  139. }
  140. /* Tablet views */
  141. @media (min-width: 42rem) {
  142. .sb-article-container {
  143. width: auto;
  144. }
  145. .sb-footer-content__inner,
  146. .drop-secondary-sidebar-for-full-width-content .sb-article,
  147. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  148. width: 42rem;
  149. }
  150. .sb-article,
  151. .match-content-width {
  152. width: 42rem;
  153. }
  154. }
  155. @media (min-width: 46rem) {
  156. .sb-footer-content__inner,
  157. .drop-secondary-sidebar-for-full-width-content .sb-article,
  158. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  159. width: 46rem;
  160. }
  161. .sb-article,
  162. .match-content-width {
  163. width: 46rem;
  164. }
  165. }
  166. @media (min-width: 50rem) {
  167. .sb-footer-content__inner,
  168. .drop-secondary-sidebar-for-full-width-content .sb-article,
  169. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  170. width: 50rem;
  171. }
  172. .sb-article,
  173. .match-content-width {
  174. width: 50rem;
  175. }
  176. }
  177. /* Tablet views */
  178. @media (min-width: 59rem) {
  179. .sb-sidebar-secondary {
  180. position: static;
  181. }
  182. .hide-when-secondary-sidebar-shown {
  183. display: none !important;
  184. }
  185. .sb-footer-content__inner,
  186. .drop-secondary-sidebar-for-full-width-content .sb-article,
  187. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  188. width: 59rem;
  189. }
  190. .sb-article,
  191. .match-content-width {
  192. width: 42rem;
  193. }
  194. }
  195. @media (min-width: 63rem) {
  196. .sb-footer-content__inner,
  197. .drop-secondary-sidebar-for-full-width-content .sb-article,
  198. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  199. width: 63rem;
  200. }
  201. .sb-article,
  202. .match-content-width {
  203. width: 46rem;
  204. }
  205. }
  206. @media (min-width: 67rem) {
  207. .sb-footer-content__inner,
  208. .drop-secondary-sidebar-for-full-width-content .sb-article,
  209. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  210. width: 67rem;
  211. }
  212. .sb-article,
  213. .match-content-width {
  214. width: 50rem;
  215. }
  216. }
  217. /* Desktop views */
  218. @media (min-width: 76rem) {
  219. .sb-sidebar-primary {
  220. position: static;
  221. }
  222. .hide-when-primary-sidebar-shown {
  223. display: none !important;
  224. }
  225. .sb-footer-content__inner,
  226. .drop-secondary-sidebar-for-full-width-content .sb-article,
  227. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  228. width: 59rem;
  229. }
  230. .sb-article,
  231. .match-content-width {
  232. width: 42rem;
  233. }
  234. }
  235. /* Full desktop views */
  236. @media (min-width: 80rem) {
  237. .sb-article,
  238. .match-content-width {
  239. width: 46rem;
  240. }
  241. .sb-footer-content__inner,
  242. .drop-secondary-sidebar-for-full-width-content .sb-article,
  243. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  244. width: 63rem;
  245. }
  246. }
  247. @media (min-width: 84rem) {
  248. .sb-article,
  249. .match-content-width {
  250. width: 50rem;
  251. }
  252. .sb-footer-content__inner,
  253. .drop-secondary-sidebar-for-full-width-content .sb-article,
  254. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  255. width: 67rem;
  256. }
  257. }
  258. @media (min-width: 88rem) {
  259. .sb-footer-content__inner,
  260. .drop-secondary-sidebar-for-full-width-content .sb-article,
  261. .drop-secondary-sidebar-for-full-width-content .match-content-width {
  262. width: 67rem;
  263. }
  264. .sb-page-width {
  265. width: 88rem;
  266. }
  267. }