The site's look is a style and a color scheme, which the client applies and the emails render in. This module names them for both halves: the client's ThemeProvider checks a stored choice against them, and the server checks GERBEUR_DEFAULT_STYLE and picks an email's palette by them.

Functions

f
isStyleName(value: unknown): value is StyleName

Checks whether value is a StyleName, as a stored choice or an environment variable must be before it is applied.

Type Aliases

Variables

v
BASE_STYLE: StyleName

The style the stylesheets draw when the root element has no data-style, and the one an unset or unknown GERBEUR_DEFAULT_STYLE means.

v
COLOR_SCHEMES: "auto" | "light" | "dark"[]

Lists every color scheme. "auto" follows the system's.

v
DEFAULT_COLOR_SCHEME: ColorScheme

The scheme of whoever hasn't picked one: the system's.

v
STYLE_NAMES:
"smooth"
| "brutalist"
| "geocities"
| "nyt"
| "kanagawa"
| "melange"
[]

Lists every site style. Each has a stylesheet under src/themes/, keyed on the root element's data-style, and an email style in api/mail/styles.ts read from that stylesheet.