fix(design): read the theme toggle colours from the token layer

The toggle was the last hard-coded palette left in the owned paths: it
carried raw gray and blue utilities with explicit dark: variants instead of
the semantic tokens the rest of the site uses.

Replace them with text-muted-foreground, hover:text-foreground, hover:bg-muted
and focus-visible:outline-accent. The tokens already swap under .dark, so the
dark: variants are redundant.

Measured contrast of the resulting states, light and dark:
muted-foreground on background 7.58:1 and 6.96:1, foreground on muted 16.19:1
and 13.98:1, accent focus ring on background 6.70:1 and 7.02:1.
This commit is contained in:
Locust agent
2026-11-03 00:52:56 +00:00
parent 58f5b29dc2
commit 2bc95279ef
+1 -1
View File
@@ -14,7 +14,7 @@ const onToggle = () => {
<template>
<button
type="button"
class="inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-lg text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400 transition-colors duration-200"
class="inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent transition-colors duration-200"
:aria-label="isDark ? 'Switch to light theme' : 'Switch to dark theme'"
@click="onToggle"
>