the home site for me: also iteration 3 or 4 of my site
1:root, 2::backdrop { 3 /* set sans-serif & mono fonts */ 4 --sans-font: 5 -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, 6 "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica, 7 "Helvetica Neue", sans-serif; 8 --serif-font: 9 Superclarendon, "Bookman Old Style", "URW Bookman", "URW Bookman L", 10 "Georgia Pro", Georgia, serif; 11 --mono-font: 12 ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, 13 "DejaVu Sans Mono", monospace; 14 --standard-border-radius: 5px; 15 16 /* default colors */ 17 color-scheme: dark; 18 --bg: var(--purple-night); 19 --noise-strength: 0.15; 20 --bg-light: var(--ultra-violet); 21 --text: var(--lavendar-breeze); 22 --text-light: var(--pink-puree); 23 --text-dark: oklch(80.28% 0.0111 204.11); 24 --accent: var(--rose-quartz); 25 --accent-dark: var(--dark-crushed-grape); 26 --accent-text: var(--purple-gray); 27 --link: var(--light-crushed-grape); 28 --link-visited: var(--red-crushed-grape); 29 --border: var(--pink-puree); 30 --selection: color-mix(in oklab, var(--accent), var(--purple-night) 50%); 31} 32 33::selection, 34::-moz-selection { 35 color: var(--bg); 36 background: var(--selection); 37} 38 39/* chromium scrollbars */ 40::-webkit-scrollbar { 41 width: 8px; 42 height: 8px; 43 overflow: visible; 44} 45 46::-webkit-scrollbar-thumb { 47 background: var(--accent); 48 width: 12px; 49} 50 51::-webkit-scrollbar-track { 52 background: var(--bg-light); 53} 54 55/* firefox scrollbars */ 56* { 57 scrollbar-color: var(--accent) var(--bg-light); 58 scrollbar-width: auto; 59} 60 61html { 62 color-scheme: light dark; 63 font-family: var(--mono-font); 64 scroll-behavior: smooth; 65} 66 67body { 68 min-height: 100svh; 69 color: var(--text); 70 background: var(--bg); 71 position: relative; 72 font-size: 1rem; 73 display: grid; 74 grid-template-columns: 1fr min(45rem, 90%) 1fr; 75 grid-template-rows: auto 1fr auto; 76 grid-row-gap: 0.625rem; 77} 78 79body>* { 80 grid-column: 2; 81} 82 83body>footer { 84 color: var(--text-light); 85 font-size: 0.875; 86} 87 88/* Format headers */ 89h1 { 90 font-size: 2rem; 91} 92 93h2 { 94 font-size: 1.75rem; 95} 96 97h3 { 98 font-size: 1.5rem; 99} 100 101h4 { 102 font-size: 1.25rem; 103} 104 105h5 { 106 font-size: 1rem; 107} 108 109h6 { 110 font-size: 0.75rem; 111} 112 113h1, 114h2, 115h3, 116h4, 117h5, 118h6 { 119 margin: 0.5em 0 0.5em 0; 120 padding: 0.22em 0.4em 0.22em 0.4em; 121 background-color: var(--accent); 122 border-bottom: 5px solid var(--bg-light); 123 border-radius: 0.2em 0.2em 0.27em 0.27em; 124 color: var(--accent-text); 125 width: fit-content; 126} 127 128/* Fix line height when title wraps */ 129h1, 130h2, 131h3 { 132 line-height: 1.1; 133} 134 135@media only screen and (max-width: 720px) { 136 h1 { 137 font-size: 1.5rem; 138 } 139 140 h2 { 141 font-size: 1.25rem; 142 } 143 144 h3 { 145 font-size: 1rem; 146 } 147 148 h4 { 149 font-size: 0.75rem; 150 } 151 152 h5 { 153 font-size: 0.5rem; 154 } 155 156 h6 { 157 font-size: 0.25rem; 158 } 159} 160 161p { 162 margin: 1rem 0; 163} 164 165/* format links */ 166a { 167 color: var(--link); 168 text-decoration: none; 169 font-weight: 600; 170 transition: color 120ms ease; 171} 172 173a:visited { 174 color: var(--link-visited); 175} 176 177a:hover, 178a:focus-visible { 179 color: var(--accent); 180 outline: none; 181} 182 183a:visited:hover, 184a:visited:focus-visible { 185 color: var(--accent); 186} 187 188/* format lists */ 189ul { 190 list-style: none; 191 margin-top: 0.25rem; 192 margin-bottom: 0.25rem; 193} 194 195ol { 196 list-style-type: decimal; 197 margin-top: 0.25rem; 198 margin-bottom: 0.25rem; 199} 200 201li { 202 margin-bottom: 0.125rem; 203} 204 205ul li::marker { 206 content: "* "; 207 color: var(--accent); 208 font-size: 1.1rem; 209} 210 211ol li::marker { 212 color: var(--accent); 213} 214 215ol li:hover::marker { 216 font-weight: 700; 217 color: var(--link); 218} 219 220/* Use flexbox to allow items to wrap, as needed */ 221header>nav ul, 222header>nav ol { 223 display: flex; 224 flex-direction: row; 225 flex-wrap: wrap; 226 align-content: space-around; 227 justify-content: right; 228 list-style-type: none; 229 margin: 0.5rem 0 0 0; 230 padding: 0; 231 gap: 1rem; 232} 233 234/* List items are inline elements, make them behave more like blocks */ 235header>nav ul li, 236header>nav ol li { 237 display: inline-block; 238} 239 240/* Consolidate box styling */ 241aside, 242details, 243progress { 244 background-color: var(--bg-light); 245 border-radius: var(--standard-border-radius); 246} 247 248aside { 249 font-size: 1rem; 250 width: 35%; 251 padding: 0 10px; 252 margin-inline-start: 10px; 253 float: right; 254} 255 256*[dir="rtl"] aside { 257 float: left; 258} 259 260/* make aside full-width on mobile */ 261@media only screen and (max-width: 720px) { 262 aside { 263 width: 100%; 264 float: none; 265 margin-inline-start: 0; 266 } 267} 268 269details { 270 padding: 0.5rem; 271} 272 273summary { 274 cursor: pointer; 275 font-weight: bold; 276 word-break: break-all; 277} 278 279details[open]>summary+* { 280 margin-top: 0; 281} 282 283details[open]>summary { 284 margin-bottom: 0.5rem; 285} 286 287details[open]> :last-child { 288 margin-bottom: 0; 289} 290 291/* Format tables */ 292table { 293 border-collapse: collapse; 294 margin: 1.5rem 0; 295 display: block; 296 overflow-x: auto; 297 white-space: nowrap; 298} 299 300td, 301th { 302 border: 1px solid var(--border); 303 text-align: start; 304 padding: 0.5rem; 305} 306 307th { 308 background-color: var(--bg-light); 309 font-weight: bold; 310} 311 312tr:nth-child(even) { 313 background-color: var(--bg-light); 314} 315 316table caption { 317 text-align: left; 318 font-weight: bold; 319 margin: 0 0 0.4rem 1rem; 320} 321 322/* format forms */ 323fieldset { 324 border: 1px dashed var(--accent); 325 border-radius: var(--standard-border-radius); 326} 327 328fieldset>legend { 329 color: var(--accent); 330} 331 332textarea, 333select, 334input, 335button, 336.button { 337 font-size: inherit; 338 font-family: inherit; 339 padding: 0.25rem; 340 border-radius: var(--standard-border-radius); 341 box-shadow: none; 342 max-width: 100%; 343 display: inline-block; 344} 345 346textarea, 347select, 348input { 349 color: var(--text); 350 background-color: var(--bg); 351 border: 1px dashed var(--border); 352} 353 354label { 355 display: block; 356} 357 358fieldset label { 359 margin: 0 0 0.3rem 0; 360} 361 362textarea { 363 max-width: 43.5rem; 364 resize: both; 365} 366 367textarea:not([cols]) { 368 width: 100%; 369} 370 371@media only screen and (max-width: 720px) { 372 373 textarea, 374 select, 375 input { 376 width: 100%; 377 } 378} 379 380/* format buttons */ 381button, 382.button, 383a.button, 384input[type="submit"], 385input[type="reset"], 386input[type="button"], 387label[type="button"] { 388 border: 1px solid var(--accent); 389 background-color: var(--accent); 390 color: var(--accent-text); 391 padding: 0.5rem 0.9rem; 392 text-decoration: none; 393 line-height: normal; 394} 395 396.button[aria-disabled="true"], 397input:disabled, 398textarea:disabled, 399select:disabled, 400button[disabled] { 401 cursor: not-allowed; 402 background-color: var(--bg-light); 403 border-color: var(--bg-light); 404 color: var(--text-light); 405} 406 407input[type="range"] { 408 padding: 0; 409 color: var(--accent); 410} 411 412abbr[title] { 413 cursor: help; 414 text-decoration-line: underline; 415 text-decoration-style: dotted; 416} 417 418button:enabled:hover, 419.button:not([aria-disabled="true"]):hover, 420input[type="submit"]:enabled:hover, 421input[type="reset"]:enabled:hover, 422input[type="button"]:enabled:hover, 423label[type="button"]:hover { 424 background-color: var(--accent-dark); 425 border-color: var(--accent-dark); 426 cursor: pointer; 427} 428 429.button:focus-visible, 430button:focus-visible:where(:enabled), 431input:enabled:focus-visible:where([type="submit"], 432 [type="reset"], 433 [type="button"]) { 434 outline: 2px solid var(--accent); 435 outline-offset: 1px; 436} 437 438/* checkbox and radio button style */ 439input[type="checkbox"], 440input[type="radio"] { 441 vertical-align: middle; 442 position: relative; 443 width: 14px; 444 height: 14px; 445} 446 447input[type="checkbox"]+label, 448input[type="radio"]+label { 449 display: inline-block; 450} 451 452input[type="radio"] { 453 border-radius: 100%; 454} 455 456input[type="checkbox"]:checked, 457input[type="radio"]:checked { 458 background-color: var(--accent); 459} 460 461@media only screen and (max-width: 720px) { 462 463 textarea, 464 select, 465 input { 466 width: 100%; 467 } 468} 469 470input[type="color"] { 471 height: 2.5rem; 472 padding: 0.2rem; 473} 474 475input[type="file"] { 476 border: 0; 477} 478 479/* misc body elements */ 480hr { 481 border: 1px dashed var(--accent); 482 margin: 0.5rem 0 0.5rem 0; 483} 484 485mark { 486 padding: 0 0.25em 0 0.25em; 487 border-radius: var(--standard-border-radius); 488 background-color: var(--accent); 489 color: var(--bg); 490} 491 492mark a { 493 color: var(--link); 494} 495 496img, 497video, 498iframe[src^="https://www.youtube-nocookie.com"], 499iframe[src^="https://www.youtube.com"] { 500 max-width: 100%; 501 height: auto; 502 border-radius: 0.35rem; 503} 504 505.img-container { 506 background-color: var(--accent); 507 border-bottom: 4px solid var(--bg-light); 508 border-radius: 7px 7px 10px 10px; 509 padding: 0.35rem; 510 margin: 1rem; 511 display: inline-block; 512 max-width: 90%; 513} 514 515figure { 516 margin: 0; 517 display: block; 518 overflow-x: auto; 519} 520 521figcaption { 522 text-align: left; 523 font-size: 0.875rem; 524 color: var(--text-light); 525 margin: 0 0 1rem 1rem; 526} 527 528blockquote { 529 margin: 0 0 0 1.25rem; 530 padding: 0.5rem 0 0 0.5rem; 531 border-inline-start: 0.375rem solid var(--accent); 532 color: var(--text-light); 533 font-style: italic; 534} 535 536p:has(cite) { 537 text-align: right; 538 font-size: 0.875rem; 539 color: var(--text-light); 540 font-weight: 600; 541} 542 543cite::before { 544 content: "— "; 545} 546 547dt { 548 color: var(--text-light); 549} 550 551code, 552pre, 553pre span, 554kbd, 555samp { 556 font-family: var(--mono-font); 557} 558 559pre { 560 border: 1px solid var(--accent); 561 max-height: 30rem; 562 padding: 0.625rem; 563 overflow-x: auto; 564 font-style: monospace; 565} 566 567p code, 568li code, 569div code { 570 padding: 0 0.125rem 0 0.125rem; 571 border-radius: 3px; 572 color: var(--bg); 573 background-color: var(--text); 574} 575 576pre code { 577 padding: 0; 578 border-radius: 0; 579 color: inherit; 580 background-color: inherit; 581} 582 583iframe { 584 max-width: 90%; 585} 586 587/* progress bars */ 588progress { 589 width: 100%; 590} 591 592progress:indeterminate { 593 background-color: var(--bg-light); 594} 595 596progress::-webkit-progress-bar { 597 border-radius: var(--standard-border-radius); 598 background-color: var(--bg-light); 599} 600 601progress::-webkit-progress-value { 602 border-radius: var(--standard-border-radius); 603 background-color: var(--accent); 604} 605 606progress::-moz-progress-bar { 607 border-radius: var(--standard-border-radius); 608 background-color: var(--accent); 609 transition-property: width; 610 transition-duration: 0.3s; 611} 612 613progress:indeterminate::-moz-progress-bar { 614 background-color: var(--bg-light); 615} 616 617dialog { 618 max-width: 40rem; 619 margin: auto; 620} 621 622dialog::backdrop { 623 background-color: var(--bg); 624 opacity: 0.8; 625} 626 627@media only screen and (max-width: 720px) { 628 dialog { 629 max-width: 100%; 630 margin: auto 1em; 631 } 632} 633 634/* superscript & subscript */ 635/* prevent scripts from affecting line-height. */ 636sup, 637sub { 638 vertical-align: baseline; 639 position: relative; 640} 641 642sup { 643 top: -0.4em; 644} 645 646sub { 647 top: 0.3em; 648}