Goaster CSS Custom Properties

February 20, 2026 ยท View on GitHub

Variables prefixed with --_gtt- are internal. Only --gtt-* variables are intended for user override.

Semantic Color Levels

Source Code

All semantic color levels use color-mix() in the oklab color space. Override the color space with:

:root {
  --gtt-color-space: oklab; /* default */
}
LevelBase Value
defaultoklch(0.554 0.046 257.417)
successoklch(0.723 0.219 149.579)
erroroklch(0.637 0.237 25.331)
warningoklch(0.769 0.188 70.08)
infooklch(0.623 0.214 259.815)

Four derived variables are generated per level from the base color:

  • --gtt-color-<level>-lightest: 10% base, 90% white
  • --gtt-color-<level>-lighter: 30% base, 70% white
  • --gtt-color-<level>-light: 70% base, 30% white
  • --gtt-color-<level>-dark: 70% base, 30% black

Variants

Source Code

All variants (except accent-light and accent-dark) automatically adapt to light/dark mode via @media (prefers-color-scheme).

VariantLight ModeDark ModeKey Visual
accentLightest-tint bg, dark text, colored left borderDark-tint bg, light text, colored left borderAuto-adaptive left accent
accent-lightLightest-tint bg, dark text, colored left border- (forced light)Explicit light mode
accent-dark- (forced dark)Dark bg, light text, colored left borderExplicit dark mode
filledBase-color bg, white textDark-color bg, lightest textBold solid background
outlinedLightest-tint bg, base border, dark textTransparent bg, light border, light textFull colored border
softLightest bg, dark text, no borderSubtle tinted dark bg, lightest text, no borderSubtle tinted background
minimalTransparent bg, dark text, no borderTransparent bg, light text, no borderJust colored text
brutalistWhite bg, thick border, offset shadowNear-black bg, thick border, offset shadowRaw, heavy, blocky
retroCream bg, warm tones, inset shadowWarm dark bg, warm tonesVintage, nostalgic
neonFalls back to defaultDark bg, neon glow bordersCyberpunk glow (dark only)

Accent

Per-level overrides:

  • --gtt-accent-<level>-bg - background (light: lightest tint; dark: 15% dark shade mixed with neutral)
  • --gtt-<level>-accent-color - text color
  • --gtt-<level>-accent-border-color - left border color

Accent Light

Per-level overrides:

  • --gtt-accent-light-<level>-bg - background (lightest tint)
  • --gtt-<level>-accent-light-color - text color
  • --gtt-<level>-accent-border-color - left border color (shared with accent)

Accent Dark

Shared:

  • --gtt-accent-dark-bg - background (default: hsla(220.9, 39.3%, 11%, 0.85))

Per-level overrides:

  • --gtt-<level>-accent-dark-color - text color
  • --gtt-<level>-accent-border-color - left border color (shared with accent/accent-light)

Filled

Per-level overrides:

  • --gtt-filled-<level>-bg - background color
  • --gtt-filled-<level>-color - text color

Outlined

Per-level overrides:

  • --gtt-outlined-<level>-bg - background (light: lightest tint; dark: transparent)
  • --gtt-outlined-<level>-color - text color
  • --gtt-outlined-<level>-border - border color

Structural: border-width: 2px.

Soft

Per-level overrides:

  • --gtt-soft-<level>-bg - background color (light: lightest tint; dark: 30% dark shade mixed with neutral)
  • --gtt-soft-<level>-color - text color

Minimal

Per-level overrides:

  • --gtt-minimal-<level>-color - text color

Background and border are always transparent.

Brutalist

Per-level overrides:

  • --gtt-brutalist-<level>-color - text color
  • --gtt-brutalist-<level>-border - border color

Shared:

  • --gtt-brutalist-bg - background (light: white; dark: hsl(0 0% 8%))

Structural: border-width: 3px, border-radius: 0, box-shadow: 4px 4px 0 0 with level base color, monospace font stack.

Retro

Per-level overrides:

  • --gtt-retro-<level>-color - text color
  • --gtt-retro-<level>-border - border color

Shared:

  • --gtt-retro-bg - background (light: hsl(45 40% 96%); dark: hsl(35 25% 18%))

Structural: border-width: 1px, box-shadow: inset 0 1px 2px for paper-like depth, serif font stack (Georgia, Palatino).

Neon (dark mode only)

No custom override properties. Uses level colors directly.

Structural: border-width: 1px, dual box-shadow glow via color-mix() at 50% and 20% opacity, monospace font stack. In light mode, toasts fall back to default appearance.

Theming

Override a base color

To change a level's color (e.g., success), override its base variable. All derived shades update automatically:

:root {
  --gtt-color-success-base: oklch(0.65 0.3 155);
}

Override a specific level's appearance

Each level exposes semantic theme aliases that sit between the color primitives and the component. Override these to change one level without touching the base color:

  • --gtt-<level>-bg - background
  • --gtt-<level>-color - text color
  • --gtt-<level>-border-color - border color
  • --gtt-<level>-progress-bar-color - progress bar color
:root {
  --gtt-success-bg: #d4edda;
  --gtt-success-color: #155724;
}

Component Styles

Source Code

Layout

PropertyDefaultDescription
--gtt-py0Vertical padding
--gtt-px0.75emHorizontal padding
--gtt-bgper-levelBackground color
--gtt-border-colorper-levelBorder color
--gtt-border-width1pxBorder width
--gtt-border-stylesolidBorder style
--gtt-border-radius0.375remBorder radius
--gtt-z-index1000Stack order

Typography

PropertyDefaultDescription
--gtt-colorper-levelText color
--gtt-font-familyinheritFont family
--gtt-font-size1remFont size
--gtt-line-height1.5Line height

Progress Bar

PropertyDefaultDescription
--gtt-progress-colorper-levelProgress bar color

Animation

PropertyDefaultDescription
--gtt-anim-name-in-topgttFadeInDownEntrance animation from top
--gtt-anim-name-in-bottomgttFadeInUpEntrance animation from bottom
--gtt-anim-name-out-topgttFadeOutUpExit animation to top
--gtt-anim-name-out-bottomgttFadeOutDownExit animation to bottom
--gtt-anim-duration-in0.5sEntrance duration
--gtt-anim-delay-in0sEntrance delay
--gtt-anim-direction-innormalEntrance direction
--gtt-anim-timing-ineaseEntrance timing function
--gtt-anim-duration-out0.5sExit duration
--gtt-anim-delay-out0sExit delay
--gtt-anim-direction-outnormalExit direction
--gtt-anim-timing-outeaseExit timing function