Use text-shadow to mark which colour scheme is active

This commit is contained in:
Lewis Dale 2023-09-27 09:09:28 +01:00
parent a950d1423d
commit ad751e11f5
2 changed files with 27 additions and 20 deletions

View File

@ -28,13 +28,14 @@ header > * {
color: var(--color-disabled); color: var(--color-disabled);
} }
&:has(:focus-visible) { &:has(:focus-visible) {
outline: 1px solid var(--color-primary); outline: 1px solid var(--color-primary);
outline-offset: 4px; outline-offset: 4px;
border-radius: 5%; border-radius: 5%;
} }
&:has([name="color-scheme"]) {
&::before { &::before {
font-family: "font awesome 6 free"; font-family: "font awesome 6 free";
@ -57,6 +58,9 @@ header > * {
content: "\f185"; content: "\f185";
} }
} }
&:has(:checked)::before {
text-shadow: var(--color-decoration) 1px 0 10px;
} }
} }
} }

View File

@ -10,16 +10,18 @@
:root { :root {
--color-secondary: var(--color-neutral-100); --color-secondary: var(--color-neutral-100);
--color-primary: var(--color-neutral-800); --color-primary: var(--color-neutral-800);
--color-decoration: var(--color-amber-800); --color-decoration: var(--color-yellow-400);
--color-subtle: var(--color-zinc-500); --color-subtle: var(--color-zinc-500);
--color-disabled: var(--color-neutral-600);
} }
} }
body[data-color-scheme="light"] { body[data-color-scheme="light"] {
--color-secondary: var(--color-neutral-100); --color-secondary: var(--color-neutral-100);
--color-primary: var(--color-neutral-800); --color-primary: var(--color-neutral-800);
--color-decoration: var(--color-amber-800); --color-decoration: var(--color-yellow-400);
--color-subtle: var(--color-zinc-500); --color-subtle: var(--color-zinc-500);
--color-disabled: var(--color-neutral-600);
} }
body[data-color-scheme="dark"] { body[data-color-scheme="dark"] {
@ -27,6 +29,7 @@ body[data-color-scheme="dark"] {
--color-secondary: var(--color-neutral-800); --color-secondary: var(--color-neutral-800);
--color-decoration: var(--color-amber-200); --color-decoration: var(--color-amber-200);
--color-subtle: var(--color-zinc-400); --color-subtle: var(--color-zinc-400);
--color-disabled: var(--color-neutral-400);
} }
body { body {