baseline.css 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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:not(header 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. table {
  124. border: 1px solid var(--primary-color);
  125. border-collapse: collapse;
  126. table-layout: fixed;
  127. text-align: left;
  128. width: 100%;
  129. }
  130. table caption { margin: 2rem 0; }
  131. table tr { border-bottom: 1px solid var(--primary-color); }
  132. table tbody tr:nth-child(even) { background: var(--tertiary-color); }
  133. table th { background: var(--secondary-color); font-weight: bold; }
  134. table th, table td { padding: 1rem; }
  135. table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid var(--primary-color); }
  136. input,
  137. button {
  138. appearance: none;
  139. border: 1px solid var(--muted-color);
  140. display: block;
  141. margin: 0.5rem 0;
  142. padding: 0.8rem;
  143. border-radius: var(--roundness);
  144. background-color: var(--page-background);
  145. color: var(--text-color);
  146. }
  147. input:focus,
  148. input:active {
  149. background-color: var(--secondary-color); border-color: var(--primary-color);
  150. }
  151. input[type=button],
  152. input[type=submit],
  153. input[type=reset],
  154. button {
  155. padding: 0.2rem 0.8rem;
  156. background-color: var(--tertiary-color);
  157. display: inline-block;
  158. }
  159. input[type=button]:hover,
  160. input[type=submit]:hover,
  161. input[type=reset]:hover,
  162. button:hover {
  163. background-color: var(--secondary-color);
  164. }
  165. input[type=button]:active,
  166. input[type=submit]:active,
  167. input[type=reset]:active,
  168. button:active {
  169. background-color: var(--secondary-color);
  170. border-color: var(--primary-color);
  171. color: var(--muted-color);
  172. }
  173. input[type=button]:focus,
  174. input[type=submit]:focus,
  175. input[type=reset]:focus,
  176. button:focus {
  177. border-color: var(--primary-color);
  178. }
  179. header[role=banner] {
  180. background: var(--content-background);
  181. background-position: center;
  182. background-size: cover;
  183. margin-top: -32px;
  184. padding-top: 32px;
  185. padding-bottom: 32px;
  186. margin-bottom: 32px;
  187. width: 100vw;
  188. margin-left: calc(-50vw + min(75ch, 100vw)/2 - 0.5rem);
  189. padding-left: calc(50vw - min(75ch, 100vw)/2 + 1.5rem);
  190. padding-right: calc(50vw - min(75ch, 100vw)/2 + 1.5rem);
  191. box-shadow: 0px 0px 10px rgba(75, 75, 75, 0.6);
  192. }
  193. article,
  194. section {
  195. background-color: var(--content-background);
  196. border-radius: var(--roundness);
  197. margin: 0 0 1em;
  198. width: 100%;
  199. page-break-inside: avoid;
  200. break-inside: avoid-column;
  201. box-sizing: border-box;
  202. padding: 8px 18px 18px 18px;
  203. border: 1px solid var(--tertiary-color);
  204. overflow: hidden;
  205. }
  206. section > img:first-child {
  207. margin: -8px -18px 8px -18px;
  208. max-width: calc(100% + 36px);
  209. }
  210. /* Classes */
  211. .muted {
  212. color: var(--muted-color);
  213. }
  214. .border-primary {
  215. border-color: var(--primary-color);
  216. }
  217. .border-secondary {
  218. border-color: var(--secondary-color);
  219. }
  220. .border-tertiary {
  221. border-color: var(--tertiary-color);
  222. }
  223. .background-primary {
  224. background-color: var(--primary-color);
  225. }
  226. .background-secondary {
  227. background-color: var(--secondary-color);
  228. }
  229. .background-tertiary {
  230. background-color: var(--tertiary-color);
  231. }
  232. section ul.compressed {
  233. margin-top: auto;
  234. }
  235. ul.compressed {
  236. list-style: none;
  237. padding-left: 0px;
  238. margin: 0px;
  239. }
  240. ul.compressed li {
  241. display: inline-block;
  242. margin-right: 18px;
  243. margin-bottom: 8px;
  244. }
  245. .larger {
  246. width: 130%;
  247. margin-left: -15%;
  248. }
  249. section.subtle {
  250. background-color: transparent;
  251. border-color: transparent;
  252. }
  253. .tight,
  254. .tight-group > *:not(:first-child):not(:last-child) {
  255. margin-bottom: 0px;
  256. margin-top: 0px;
  257. }
  258. .tight-group > *:first-child {
  259. margin-bottom: 0px;
  260. }
  261. .tight-group > *:last-child {
  262. margin-top: 0px;
  263. }
  264. span.icon {
  265. text-decoration: none !important;
  266. display: inline-block;
  267. margin-right: 1ch;
  268. }
  269. /* Mobile Styling */
  270. @media screen and (max-width: 75ch) {
  271. body, input {
  272. font: var(--mobile-font-size) var(--primary-font);
  273. }
  274. table { table-layout: auto; }
  275. }
  276. @media screen and (max-width: 130ch) {
  277. .larger {
  278. margin-left: 0px;
  279. width: auto;
  280. }
  281. }
  282. /* Dark mode support */
  283. @media (prefers-color-scheme: dark) {
  284. :root {
  285. --text-color: #fff;
  286. --muted-color: #c5c5c5;
  287. --link-color: orange;
  288. --link-color-alt: yellow;
  289. --primary-color: orange;
  290. --secondary-color: black;
  291. --tertiary-color: #2d2d2d;
  292. --page-baground: #2b2b2b;
  293. --content-background: #191919;
  294. }
  295. header[role=banner] {
  296. box-shadow: inset 0px -3px 5px rgba(75, 75, 75, 1);
  297. }
  298. }