Design system foundation + fix white flash (Phase 10e-1, 10e-2) #22
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-2026-03-08-tryout-prep→ Phase 10e → Phase 10e-1 (Fix white flash) + Phase 10e-2 (Design system foundation)Repo
forgejo_admin/westside-appUser Story
As a mobile user (Marcus)
I want the app to load with a dark theme instantly and have consistent, professional styling
So that I don't see a white flash on every page load and the app looks polished on my phone
Context
Session 2026-03-15 live mobile testing revealed a white background flash on every page load. Root cause: the dark theme (
background-color: #0a0a0a; color: #e0e0e0;) is defined in+layout.svelteinside<svelte:head><style>— a JS-dependent injection. The browser renders the default whiteapp.htmlfirst, then SvelteKit hydrates and injects the dark styles. This also causes a hydration mismatch warning.Additionally, there is zero design system. Every route has its own
<style>block with hardcoded hex values copy-pasted across 9 routes + AuthStatus component. The same colors (#c41230,#141414,#222,#e0e0e0,#666,#7ec875,#ffd700,#ff6b6b,#6bb5ff) are redefined in every file. No CSS custom properties, no shared stylesheet, no design tokens.Decision: combine 10e-1 and 10e-2 because fixing where base styles live (app.html) and extracting a design system (app.css) are tightly coupled.
File Targets
Files to modify:
src/app.html— add inline<style>for critical dark theme (bg, text color, box-sizing reset). This renders before JS.src/routes/+layout.svelte— remove<svelte:head><style>block, importapp.cssinsteadsrc/app.css— CREATE. Design tokens as CSS custom properties, base typography, responsive breakpointssrc/routes/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/admin/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/admin/teams/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/admin/users/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/coach/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/player/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/teams/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/signin/+page.svelte— replace hardcoded hex with CSS variablessrc/routes/signout/+page.svelte— replace hardcoded hex with CSS variablessrc/lib/components/AuthStatus.svelte— replace hardcoded hex with CSS variablesFiles NOT to touch:
src/routes/**/+page.server.js— data fetching logic, not relatedsrc/hooks.server.js— auth middleware, not relatedsrc/auth.js— auth config, not relatedAcceptance Criteria
grep -rn '#c41230\|#0a0a0a\|#141414\|#e0e0e0' src/routes/ src/lib/the only hex values are inapp.css(routes usevar(--...))src/app.cssexists with CSS custom properties for all design tokensapp.css(loaded in layout), not per-file hardcoded values.container,.alert,.stat-card,.btn, etc.) that repeat across routes are consolidated intoapp.csswhere appropriateTest Expectations
npm run buildcompletes without errorsnpm run build && npm run previewConstraints
app.htmlinline styles minimal — only critical above-the-fold dark theme. Full design system goes inapp.css@media (max-width: 480px))src/app.cssimported in root+layout.svelteChecklist
npm run build)Related
westside-basketball— projectplan-2026-03-08-tryout-prep— parent plan