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:
co-authored by
Marvin Hagemeister
parent
adf8b87a03
commit
b1f2a989a5
@@ -20,7 +20,7 @@ export default function VersionSelect(
|
||||
</label>
|
||||
{selectedIsLatest && (
|
||||
<div class="flex absolute pointer-events-none select-none w-full h-full items-center justify-end pr-8">
|
||||
<div class="rounded-full px-2 py-1 text-xs tag-label bg-[#056CF025] text-blue-700">
|
||||
<div class="rounded-full px-2 py-1 text-xs tag-label bg-[#056CF025] dark:bg-[#2182ff45] text-blue-700 dark:text-blue-400">
|
||||
Latest
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,9 +34,9 @@ export default function VersionSelect(
|
||||
)}
|
||||
<select
|
||||
id="version"
|
||||
class={`rounded-md block border border-gray-300 appearance-none bg-white form-select-bg font-semibold ${
|
||||
class={`rounded-md block border border-foreground-primary/20 appearance-none bg-background-primary form-select-bg font-semibold ${
|
||||
selectedIsLatest ? "pr-22" : "pr-10"
|
||||
} py-2 pl-3 w-full h-full leading-none sm:(text-sm leading-5) focus:(outline-none border-blue-300) hover:bg-gray-100`}
|
||||
} py-2 pl-3 w-full h-full leading-none sm:(text-sm leading-5) focus:(outline-none border-blue-300) hover:bg-background-secondary`}
|
||||
value={selectedVersion}
|
||||
onChange={(e) => {
|
||||
if (e.currentTarget.value !== selectedVersion) {
|
||||
|
||||
Reference in New Issue
Block a user