baseline.css 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. /* Reset */
  2. html, body, div, span, applet, object, iframe,
  3. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  4. a, abbr, acronym, address, big, cite, code,
  5. del, dfn, em, img, ins, kbd, q, s, samp,
  6. small, strike, strong, sub, sup, tt, var,
  7. b, u, i, center,
  8. dl, dt, dd, ol, ul, li,
  9. fieldset, form, label, legend,
  10. table, caption, tbody, tfoot, thead, tr, th, td,
  11. article, aside, canvas, details, embed,
  12. figure, figcaption, footer, header, hgroup,
  13. menu, nav, output, ruby, section, summary,
  14. time, mark, audio, video {
  15. margin: 0;
  16. padding: 0;
  17. border: 0;
  18. font-size: 100%;
  19. font: inherit;
  20. vertical-align: baseline;
  21. }
  22. * {
  23. box-sizing: border-box;
  24. }
  25. /* Variables */
  26. :root {
  27. --desktop-font-size: 1.2rem/1.5;
  28. --mobile-font-size: 1rem/1.4;
  29. --text-color: #2d2d2d;
  30. --muted-color: #858585;
  31. --link-color: blue;
  32. --link-color-alt: darkblue;
  33. --primary-color: lightsteelblue;
  34. --secondary-color: aliceblue;
  35. --tertiary-color: whitesmoke;
  36. --page-baground: #eeeeee;
  37. --content-background: #ffffff;
  38. --display-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
  39. --primary-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
  40. --secondary-font: "Georgia", serif;
  41. --monospace-font: monospace;
  42. --roundness: 0.5rem;
  43. }
  44. /* Typography */
  45. body {
  46. color: var(--text-color);
  47. margin: 0 auto;
  48. max-width: 75ch;
  49. padding: 0 0.5rem;
  50. background-color: var(--page-baground);
  51. }
  52. body, input, button {
  53. font: var(--desktop-font-size) var(--primary-font);
  54. }
  55. h1,h2,h3,h4,h5,h6,p,blockquote,dl,img,figure {
  56. margin: 2rem 0;
  57. }
  58. h1,h2,h3,h4,h5,h6 { font-weight: bold; line-height: 1.2; font-family: var(--display-font); }
  59. h1 { font-size: 200%; }
  60. h2 { font-size: 150%; }
  61. h3 { font-size: 120%; }
  62. h4,h5,h6 { font-size: 100%; }
  63. h5, h6 { text-transform: uppercase; }
  64. header h1 { border-bottom: 1px solid; }
  65. p { margin: 2rem 0; }
  66. a,a:visited { color: var(--link-color); }
  67. a:hover,a:focus { color: var(--link-color-alt); }
  68. strong, time, b { font-weight: bold; }
  69. em, dfn, i { font-style: italic; }
  70. sub { font-size: 60%; vertical-align: bottom; }
  71. small { font-size: 80%; }
  72. blockquote, q {
  73. background: var(--secondary-color);
  74. border-left: 10px solid var(--primary-color);
  75. display: block;
  76. font-family: var(--secondary-font);
  77. padding: 1rem;
  78. border-radius: var(--roundness);
  79. }
  80. blockquote p:first-child { margin-top: 0; }
  81. blockquote p:last-child { margin-bottom: 0; }
  82. cite {
  83. font-family: var(--secondary-font);
  84. font-style: italic;
  85. font-weight: bold;
  86. margin-top: 1rem;
  87. }
  88. kbd,code,samp,pre,var { font-family: var(--monospace-font); }
  89. code, pre {
  90. background: var(--tertiary-color);
  91. overflow: auto;
  92. padding: 0.5rem 1rem;
  93. }
  94. code pre , pre code { padding: 0; }
  95. h1+h2,
  96. h3+h4{
  97. margin-top: -1.2em;
  98. margin-bottom: 1.2em;
  99. color: var(--muted-color)
  100. }
  101. /* Elements */
  102. hr {
  103. background: var(--text-color);
  104. border: 0;
  105. height: 1px;
  106. margin: 4rem 0;
  107. }
  108. img {
  109. display: block;
  110. height: auto;
  111. max-width: 100%;
  112. }
  113. figure {
  114. border: 1px solid var(--primary-color);
  115. display: inline-block;
  116. padding: 1rem;
  117. width: 100%;
  118. }
  119. figure img { margin: 0 auto; }
  120. figure figcaption { font-size: 80%; margin-top: 0.5rem; text-align: center; }
  121. ul, ol { margin: 2rem 0; padding: 0 0 0 4rem; }
  122. dl dd { padding-left: 2rem; }
  123. ul.links,
  124. nav ul {
  125. list-style: none;
  126. padding-left: 0px;
  127. margin: 0px;
  128. }
  129. ul.links li,
  130. nav ul li {
  131. display: inline-block;
  132. margin-right: 18px;
  133. margin-bottom: 8px;
  134. }
  135. table {
  136. border: 1px solid var(--primary-color);
  137. border-collapse: collapse;
  138. table-layout: fixed;
  139. text-align: left;
  140. width: 100%;
  141. }
  142. table caption { margin: 2rem 0; }
  143. table tr { border-bottom: 1px solid var(--primary-color); }
  144. table tbody tr:nth-child(even) { background: var(--tertiary-color); }
  145. table th { background: var(--secondary-color); font-weight: bold; }
  146. table th, table td { padding: 1rem; }
  147. table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid var(--primary-color); }
  148. input,
  149. button {
  150. appearance: none;
  151. border: 1px solid var(--muted-color);
  152. display: block;
  153. margin: 0.5rem 0;
  154. padding: 0.8rem;
  155. border-radius: var(--roundness);
  156. background-color: var(--page-background);
  157. color: var(--text-color);
  158. }
  159. input:focus,
  160. input:active {
  161. background-color: var(--secondary-color); border-color: var(--primary-color);
  162. }
  163. input[type=button],
  164. input[type=submit],
  165. input[type=reset],
  166. button {
  167. padding: 0.2rem 0.8rem;
  168. background-color: var(--tertiary-color);
  169. display: inline-block;
  170. }
  171. input[type=button]:hover,
  172. input[type=submit]:hover,
  173. input[type=reset]:hover,
  174. button:hover {
  175. background-color: var(--secondary-color);
  176. }
  177. input[type=button]:active,
  178. input[type=submit]:active,
  179. input[type=reset]:active,
  180. button:active {
  181. background-color: var(--secondary-color);
  182. border-color: var(--primary-color);
  183. color: var(--muted-color);
  184. }
  185. input[type=button]:focus,
  186. input[type=submit]:focus,
  187. input[type=reset]:focus,
  188. button:focus {
  189. border-color: var(--primary-color);
  190. }
  191. header[role=banner] {
  192. background: var(--content-background);
  193. background-position: center;
  194. background-size: cover;
  195. margin-top: -32px;
  196. padding-top: 32px;
  197. padding-bottom: 32px;
  198. margin-bottom: 32px;
  199. width: 100vw;
  200. margin-left: calc(-50vw + min(75ch, 100vw)/2 - 8px);
  201. padding-left: calc(50vw - min(75ch, 100vw)/2 + 8px);
  202. padding-right: calc(50vw - min(75ch, 100vw)/2 + 8px);
  203. box-shadow: 0px 0px 10px rgba(75, 75, 75, 0.6);
  204. }
  205. article,
  206. section {
  207. background-color: var(--content-background);
  208. border-radius: var(--roundness);
  209. margin: 0 0 1em;
  210. width: 100%;
  211. page-break-inside: avoid;
  212. break-inside: avoid-column;
  213. box-sizing: border-box;
  214. padding: 8px 18px 18px 18px;
  215. border: 1px solid var(--tertiary-color);
  216. }
  217. footer {
  218. padding-bottom: 32px;
  219. }
  220. /* Classes */
  221. .muted {
  222. color: var(--muted-color);
  223. }
  224. .border-primary {
  225. border-color: var(--primary-color);
  226. }
  227. .border-secondary {
  228. border-color: var(--secondary-color);
  229. }
  230. .border-tertiary {
  231. border-color: var(--tertiary-color);
  232. }
  233. .background-primary {
  234. background-color: var(--primary-color);
  235. }
  236. .background-secondary {
  237. background-color: var(--secondary-color);
  238. }
  239. .background-tertiary {
  240. background-color: var(--tertiary-color);
  241. }
  242. /* Mobile Styling */
  243. @media screen and (max-width: 75ch) {
  244. body, input {
  245. font: var(--mobile-font-size) var(--primary-font);
  246. }
  247. table { table-layout: auto; }
  248. }
  249. /* Dark mode support */
  250. @media (prefers-color-scheme: dark) {
  251. :root {
  252. --text-color: #fff;
  253. --muted-color: #c5c5c5;
  254. --link-color: orange;
  255. --link-color-alt: yellow;
  256. --primary-color: orange;
  257. --secondary-color: black;
  258. --tertiary-color: #2d2d2d;
  259. --page-baground: #2b2b2b;
  260. --content-background: #191919;
  261. }
  262. .light-only {
  263. display: none !important;
  264. }
  265. header[role=banner] {
  266. box-shadow: inset 0px -3px 5px rgba(75, 75, 75, 1);
  267. }
  268. }
  269. @media (prefers-color-scheme: light) {
  270. .dark-only {
  271. display: none !important;
  272. }
  273. }