Fix automatic readable text contrast for public and admin themes.
Local Build and Deploy / deploy (push) Successful in 55s

Derive admin/public text colors from WCAG contrast, unify ThemeVars CSS emission, and keep navbar overrides in sync with readable vars.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-15 20:41:34 +02:00
1 parent 9d4d409b77
commit d7278c77f9
9 files changed
+205 -176

No files matched your search

+8
View File
@@ -39,6 +39,10 @@ export function NavbarColorPicker() {
if (!c) return;
document.documentElement.style.setProperty("--color-navbar", c.value);
document.documentElement.style.setProperty("--color-navbar-text", c.text);
document.documentElement.style.setProperty(
"--color-navbar-text-readable",
c.text,
);
try {
localStorage.setItem("navbarColor", c.value);
localStorage.setItem("navbarTextColor", c.text);
@@ -58,6 +62,10 @@ export function NavbarColorPicker() {
"--color-navbar-text",
savedText,
);
document.documentElement.style.setProperty(
"--color-navbar-text-readable",
savedText,
);
}
setMounted(true);
}, []);