www: docs: feat: add dark mode (#2820)

- Added CSS vars for dark/light colors.
- Added dark/light theme toggle as Island

Fixes #2648

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
David Monaghan
2025-02-04 11:58:05 +01:00
committed by GitHub
co-authored by Marvin Hagemeister
parent adf8b87a03
commit b1f2a989a5
16 changed files with 320 additions and 46 deletions
+13 -2
View File
@@ -21,8 +21,19 @@ export default {
theme: {
extend: {
colors: {
fresh: "#FFDB1E",
"fresh-dark": "#401C00",
// Dark/light with Tailwind done right using CSS variables:
"fresh": "hsla(var(--fresh))",
"fresh-green": "hsla(var(--fresh-green))",
"background-primary": "hsla(var(--background-primary))",
"background-secondary": "hsla(var(--background-secondary))",
"background-tertiary": "hsla(var(--background-tertiary))",
"foreground-primary": "hsla(var(--foreground-primary))",
"foreground-secondary": "hsla(var(--foreground-secondary))",
"foreground-tertiary": "hsla(var(--foreground-tertiary))",
"foreground-quaternary": "hsla(var(--foreground-quaternary))",
"info": "hsla(var(--info))",
},
},
},