tiny, simple, classless CSS framework inspired by new.css devcss.devins.page
framework lightweight css classless stylesheet

feat: use color scheme for more than inputs

uses it across the document, so scrollbars are also themed

+43 -41
+43 -41
dev.css
··· 2 /* about: tiny, simple, classless CSS framework in the style of Vercel's Geist design system */ 3 4 /* table of contents 5 - 1. configuration 6 - 2. dark mode handling 7 - 3. css reset 8 - 4. margins for most elements 9 - 5. font family 10 - 6. body and selection styling 11 - 7. typography 12 - 8. blockquotes 13 - 9. header 14 - 10. footer 15 - 11. buttons and inputs 16 - 12. code and keyboards 17 - 13. details 18 - 14. description lists 19 - 15. horizontal rules 20 - 16. fieldsets 21 - 17. tables 22 - 18. lists 23 */ 24 25 /* 1. configuration */ ··· 29 "Segoe UI", sans-serif; 30 --dc-font-mono: "Geist Mono", monospace; 31 32 - /* color scheme for inputs */ 33 - --dc-cs: light; 34 - 35 /* light colors */ 36 --dc-tx-1: #000000; 37 --dc-tx-2: #1a1a1a; 38 --dc-bg-1: #fafafa; ··· 46 --dc-ac-tx: #ededed; 47 48 /* dark colors */ 49 --dc-d-tx-1: #ededed; 50 --dc-d-tx-2: #a1a1a1; 51 --dc-d-bg-1: #000; ··· 62 /* 2. dark mode handling */ 63 @media (prefers-color-scheme: dark) { 64 :root { 65 --dc-tx-1: var(--dc-d-tx-1); 66 --dc-tx-2: var(--dc-d-tx-2); 67 --dc-bg-1: var(--dc-d-bg-1); ··· 73 --dc-lkb-tx: var(--dc-d-lkb-tx); 74 --dc-ac-1: var(--dc-d-ac-1); 75 --dc-ac-tx: var(--dc-d-ac-tx); 76 - 77 - /* color scheme for inputs */ 78 - --dc-cs: dark; 79 } 80 } 81 82 - /* 3. css reset - cleaned up https://www.joshwcomeau.com/css/custom-css-reset */ 83 *, 84 *::before, 85 *::after { ··· 113 isolation: isolate; 114 } 115 116 - /* 4. margins for most elements */ 117 address, 118 area, 119 article, ··· 147 margin-bottom: 1rem; 148 } 149 150 - /* 5. font family */ 151 html { 152 font-family: var(--dc-font-sans); 153 } ··· 159 font-family: var(--dc-font-mono); 160 } 161 162 - /* 6. body and selection styling */ 163 body { 164 margin: 0 auto; 165 max-width: 48rem; ··· 175 color: var(--dc-ac-tx); 176 } 177 178 - /* 7. typography */ 179 h1, 180 h2, 181 h3, ··· 217 border-radius: 0.25rem; 218 } 219 220 - /* 8. blockquotes */ 221 blockquote { 222 padding: 1.25rem; 223 background: var(--dc-bg-2); ··· 231 margin-bottom: 0; 232 } 233 234 - /* 9. header */ 235 header { 236 background: var(--dc-bg-2); 237 border-bottom: 1px solid var(--dc-bg-3); ··· 297 content: "• "; 298 } 299 300 - /* 10. footer */ 301 footer { 302 border-top: 1px solid var(--dc-bg-3); 303 padding: 0.5rem calc(50vw - 50%); ··· 317 border-bottom: 0; 318 } 319 320 - /* 11. buttons and inputs */ 321 a button, 322 button, 323 input[type="submit"], ··· 369 border-radius: 0.25rem; 370 box-shadow: none; 371 box-sizing: border-box; 372 - color-scheme: var(--dc-cs); 373 } 374 375 textarea { 376 max-width: 100%; 377 } 378 379 - /* 12. code and keyboards */ 380 code, 381 samp, 382 kbd, ··· 398 overflow: auto; 399 } 400 401 - /* 13. details */ 402 details { 403 padding: 0.5rem 1rem; 404 background: var(--dc-bg-2); ··· 425 padding-bottom: 0; 426 } 427 428 - /* 14. description lists */ 429 dt { 430 font-weight: bold; 431 } ··· 434 content: "→ "; 435 } 436 437 - /* 15. horizontal rules */ 438 hr { 439 border: 0; 440 border-bottom: 1px solid var(--dc-bg-3); 441 margin: 1rem auto; 442 } 443 444 - /* 16. fieldsets */ 445 fieldset { 446 margin-top: 1rem; 447 padding: 2rem; ··· 453 padding: auto 0.5rem; 454 } 455 456 - /* 17. tables */ 457 table { 458 border-collapse: collapse; 459 width: 100%; ··· 479 margin-bottom: 0.5rem; 480 } 481 482 - /* 18. lists */ 483 ol, 484 ul { 485 padding-left: 2rem;
··· 2 /* about: tiny, simple, classless CSS framework in the style of Vercel's Geist design system */ 3 4 /* table of contents 5 + 1. configuration 6 + 2. dark mode handling 7 + 3. root color scheme 8 + 4. css reset 9 + 5. margins for most elements 10 + 6. font family 11 + 7. body and selection styling 12 + 8. typography 13 + 9. blockquotes 14 + 10. header 15 + 11. footer 16 + 12. buttons and inputs 17 + 13. code and keyboards 18 + 14. details 19 + 15. description lists 20 + 16. horizontal rules 21 + 17. fieldsets 22 + 18. tables 23 + 19. lists 24 */ 25 26 /* 1. configuration */ ··· 30 "Segoe UI", sans-serif; 31 --dc-font-mono: "Geist Mono", monospace; 32 33 /* light colors */ 34 + --dc-cs: light; 35 --dc-tx-1: #000000; 36 --dc-tx-2: #1a1a1a; 37 --dc-bg-1: #fafafa; ··· 45 --dc-ac-tx: #ededed; 46 47 /* dark colors */ 48 + --dc-d-cs: dark; 49 --dc-d-tx-1: #ededed; 50 --dc-d-tx-2: #a1a1a1; 51 --dc-d-bg-1: #000; ··· 62 /* 2. dark mode handling */ 63 @media (prefers-color-scheme: dark) { 64 :root { 65 + --dc-cs: var(--dc-d-cs); 66 --dc-tx-1: var(--dc-d-tx-1); 67 --dc-tx-2: var(--dc-d-tx-2); 68 --dc-bg-1: var(--dc-d-bg-1); ··· 74 --dc-lkb-tx: var(--dc-d-lkb-tx); 75 --dc-ac-1: var(--dc-d-ac-1); 76 --dc-ac-tx: var(--dc-d-ac-tx); 77 } 78 } 79 80 + /* 3. root color scheme */ 81 + :root { 82 + color-scheme: only var(--dc-cs); 83 + } 84 + 85 + /* 4. css reset - cleaned up https://www.joshwcomeau.com/css/custom-css-reset */ 86 *, 87 *::before, 88 *::after { ··· 116 isolation: isolate; 117 } 118 119 + /* 5. margins for most elements */ 120 address, 121 area, 122 article, ··· 150 margin-bottom: 1rem; 151 } 152 153 + /* 6. font family */ 154 html { 155 font-family: var(--dc-font-sans); 156 } ··· 162 font-family: var(--dc-font-mono); 163 } 164 165 + /* 7. body and selection styling */ 166 body { 167 margin: 0 auto; 168 max-width: 48rem; ··· 178 color: var(--dc-ac-tx); 179 } 180 181 + /* 8. typography */ 182 h1, 183 h2, 184 h3, ··· 220 border-radius: 0.25rem; 221 } 222 223 + /* 9. blockquotes */ 224 blockquote { 225 padding: 1.25rem; 226 background: var(--dc-bg-2); ··· 234 margin-bottom: 0; 235 } 236 237 + /* 10. header */ 238 header { 239 background: var(--dc-bg-2); 240 border-bottom: 1px solid var(--dc-bg-3); ··· 300 content: "• "; 301 } 302 303 + /* 11. footer */ 304 footer { 305 border-top: 1px solid var(--dc-bg-3); 306 padding: 0.5rem calc(50vw - 50%); ··· 320 border-bottom: 0; 321 } 322 323 + /* 12. buttons and inputs */ 324 a button, 325 button, 326 input[type="submit"], ··· 372 border-radius: 0.25rem; 373 box-shadow: none; 374 box-sizing: border-box; 375 } 376 377 textarea { 378 max-width: 100%; 379 } 380 381 + /* 13. code and keyboards */ 382 code, 383 samp, 384 kbd, ··· 400 overflow: auto; 401 } 402 403 + /* 14. details */ 404 details { 405 padding: 0.5rem 1rem; 406 background: var(--dc-bg-2); ··· 427 padding-bottom: 0; 428 } 429 430 + /* 15. description lists */ 431 dt { 432 font-weight: bold; 433 } ··· 436 content: "→ "; 437 } 438 439 + /* 16. horizontal rules */ 440 hr { 441 border: 0; 442 border-bottom: 1px solid var(--dc-bg-3); 443 margin: 1rem auto; 444 } 445 446 + /* 17. fieldsets */ 447 fieldset { 448 margin-top: 1rem; 449 padding: 2rem; ··· 455 padding: auto 0.5rem; 456 } 457 458 + /* 18. tables */ 459 table { 460 border-collapse: collapse; 461 width: 100%; ··· 481 margin-bottom: 0.5rem; 482 } 483 484 + /* 19. lists */ 485 ol, 486 ul { 487 padding-left: 2rem;