style upgrades

This commit is contained in:
2026-07-12 21:26:39 -07:00
parent ec334bbed4
commit 4f81f3c0ca
72 changed files with 1541 additions and 471 deletions
+27
View File
@@ -0,0 +1,27 @@
export type ChromeColorScheme = "light" | "dark";
export const CHROME_COLORS: Record<
ChromeColorScheme,
{ base: string; dimmed: string }
> = {
light: { base: "#ffffff", dimmed: "#999999" },
dark: { base: "#242424", dimmed: "#161616" },
};
export function setThemeColorMeta(color: string): void {
if (typeof document === "undefined") return;
const metas = document.querySelectorAll<HTMLMetaElement>(
'meta[name="theme-color"]'
);
if (metas.length === 0) {
const meta = document.createElement("meta");
meta.name = "theme-color";
meta.content = color;
document.head.appendChild(meta);
return;
}
metas.forEach((meta) => meta.setAttribute("content", color));
}