theme-system
The Lossless Group's theme and mode architecture — two-tier token system, three-mode contract (light/dark/vibrant), theme.css organization, and design system conventions. Use when setting up themes/modes for any Astro Knots site, debugging mode toggles, working with CSS tokens, or when the user mentions "vibrant mode", "two-tier tokens", "theme.css", or design system patterns.
The Lossless Group's firm-wide conventions for theme architecture, visual modes, and design token systems.
Status: Initial scaffold (May 2026) — actively developing from astro-knots patterns.
When to use this skill
Setting up theme/mode architecture for a new site
Debugging mode toggle issues (light/dark/vibrant not working)
Implementing two-tier token systems
Deciding between
theme.cssvsglobal.cssorganizationCreating
/brand-kitor/design-systemreference pagesPicking a starting palette for a new site (see "Sample themes")
User mentions "vibrant mode", "two-tier tokens", "mode switcher", "theme architecture"
Core Principles (WIP)
1. Three-Mode Contract (Not Two)
Every Lossless site ships with three modes, not two:
Light — clean, minimal, high readability
Dark — code-editor feel, moderate intensity
Vibrant — neon energy, loud gradients, glassmorphic surfaces
Why three? Stakeholder management. Nerds pick dark, traditionalists pick light, design-forward stakeholders pick vibrant. The toggle ends the "which mode" argument before it starts.
Critical: Vibrant mode is dark-based (like dark mode, not light mode). Common error: vibrant inherits light mode's white background. See references/vibrant-mode-implementation.md (TBD).
2. Two-Tier Token System
Tokens come in two tiers:
Tier 1: Named tokens (
--color__blue-azure,--font__lato)Raw values, BEM-ish
__separatorPrivate to the theme (components don't read these directly)
Tier 2: Semantic tokens (
--color-primary,--font-body)Kebab-case, what Tailwind utilities and components consume
Reference named tokens via
var()
Why two tiers? Client iteration. When a client wants a different primary color, you add/change a named token and re-point the semantic token. Components don't change.
See references/two-tier-tokens.md (TBD).
3. File Organization
theme.css— all token definitions (named + semantic), mode blocksglobal.css— imports@tailwindcss, importstheme.css, base resets
See references/file-organization.md (TBD).
Cross-skill ties
astro-knots— this skill extracts patterns from astro-knots sitescontext-vigilance—/brand-kitand/design-systempages follow doc conventions
Sample themes
references/sample-themes/ holds 27 dark palettes sampled from the built-in
themes of the terminal app Rex, one <theme>.css per theme in the two-tier
format above (sampled tier 1, semantic tier 2 for dark mode), plus a
preview.html that shows them all as cards. Reach for them when a new site
or a redesign direction needs a starting palette, or when a client asks to
see options. Read references/sample-themes/README.md first: it explains
which tokens are sampled and which derived, how to add the light and vibrant
modes (one worked vibrant example is in abyssal-trench.css), and which
palettes don't fit the status-color mapping.
Canonical References
Sites with strong implementations:
All paths are under astro-knots/. Verified 2026-10-06.
sites/lossless-toolkit-site—data-modewith plain CSS. It has three designed modes insrc/styles/theme.css(dark:62-87, light:90-116, vibrant:119-146) and an inline head pre-paint script atsrc/layouts/Base.astro:46-61.splash/—data-mode, a head pre-paint script (src/layouts/BaseLayout.astro:45-60), and a labeled radiogroupModeToggle.astro.sites/lossless-slides-site— the Tailwind v4 wiring for three modes:@custom-variant× 3 and@theme inlineinsrc/styles/globals.css:8-35, with effects switched off by token insrc/styles/tokens.css. It usesdata-theme, a site deviation, so rename it todata-modewhen copying.sites/fullstack-vc— the vibrant mode reference (lines 162-211 ofsrc/styles/theme.css).Not a mode reference:
sites/hypernova-site. Its switcher is two-mode only and losesvibrant.packages/ui/theme-modeapplies the mode onDOMContentLoaded, which runs after first paint, so it needs an inline pre-paint script added.Lossless brand sites (changelog, toolkit, slides, client-portals) default to vibrant. See
astro-knots/context-v/explorations/Implement-Three-Mode-Theme-System-for-Lossless-Brand-Site-Decouplings.md.
What's Not Here Yet (TBD)
This skill is actively under development. Planned content:
references/vibrant-mode-implementation.md— full guide to dark-based vibrant modereferences/two-tier-tokens.md— deep dive on token architecturereferences/file-organization.md— theme.css vs global.css vs utilitiesreferences/mode-switcher-utilities.md— JS utilities patternreferences/brand-kit-page.md— required sections and patternsreferences/design-system-page.md— component catalog conventionsTemplates for common token sets (minimal, comprehensive)
Development Notes
This skill is being extracted from:
astro-knots/context-v/blueprints/Maintain-Themes-Mode-Across-CSS-Tailwind.mdastro-knots/context-v/prompts/New-Site-Quickstart-Guide.md§6astro-knots/references/playbooks/new-site-setup.md§8-9Live implementations in
sites/lossless-toolkit-site,sites/lossless-slides-site,splash/,sites/fullstack-vc(andsites/reach-edu-hub, not checked out locally)
Content will be migrated and refined incrementally. For now, cross-reference those sources.
See also
Astro Knots blueprint:
astro-knots/context-v/blueprints/Maintain-Themes-Mode-Across-CSS-Tailwind.mdDesign system maintenance:
astro-knots/context-v/blueprints/Maintain-Design-System-and-Brandkit-Motions.md