1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-16 17:55:32 -04:00

reorganize style and font configs

This commit is contained in:
2022-04-20 11:19:02 -04:00
parent c2a5f6c94c
commit 54c662c1f2
15 changed files with 23 additions and 34 deletions

19
lib/config/themes.ts Normal file
View File

@@ -0,0 +1,19 @@
import { theme, darkTheme } from "../styles/stitches.config";
// theme classnames are generated dynamically by stitches, so have ThemeProvider pull them from there
export const themeClassNames = {
light: theme.className,
dark: darkTheme.className,
};
// colors used for `<meta name="theme-color" .../>` (see components/Layout/Layout.tsx)
export const themeColors = {
light: theme.colors.backgroundOuter?.value,
dark: darkTheme.colors.backgroundOuter?.value,
};
// https://web.dev/prefers-color-scheme/#the-prefers-color-scheme-media-query
export const darkModeQuery = "(prefers-color-scheme: dark)";
// local storage key
export const themeStorageKey = "preferred-theme";