Appearance
PWA Theming & Design System Implementation
This document details the styling integration of the "Electric Functionality" dark-mode theme and typography setup in the Astro PWA.
Style Integration Steps
The design system was configured using the tokens outlined in 08-pwa-theme-design.md:
1. Global CSS Stylesheet
Created the global stylesheet at global.css and defined the theme variables on the :root:
--main-stage-black(#09090B): Used for base background.--backstage-grey(#18181B): Used for container/panel card backgrounds.--strobe-white(#FAFAFA): Core text color.--route-cyan(#00E5FF): Used for primary action buttons, connection indicators, and highlighted accents.--clash-magenta(#FF007A): Strictly reserved for warning text, failed states, and layout overflows.--sunset-orange(#FF5C00): Used for intermediate connection/offline indicators.--gridline-grey(#333338): Used for borders and separators.
2. Typography
Linked standard fonts in the head of index.astro:
- Space Grotesk: Configured as the header font for all headings (
h1,h2,h3, etc.) to provide high visibility, tech-heavy headers. - Inter: Set as the default font-family for general body, text blocks, and paragraphs for readability in high-glare environments.
3. Applied Layout Styling
Updated the PWA app shell index.astro:
- Configured a central card styled with
--backstage-greyand a thin--gridline-greyborder. - Styled a Force Sync button using
--route-cyanbackground and text colored with--main-stage-black. Added a custombox-shadowto create a neon-glow effect. - Updated status board colors, using
--route-cyanto frame active statuses and--clash-magenta/--sunset-orangeto highlight warnings or network transitions.
Build Verification
- Package Compilation: Successfully compiled the stylesheet and asset modules using
npx astro build. - Packaging: Verified the output directory contains the compiled CSS files correctly referenced in the production index.html.