From 5c1e0821e762c2dd098a01b2bb6231c7f8568736 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 7 Sep 2026 19:55:08 +0200 Subject: Extract duplicated styles into shared molecules and color atoms Move .score, .status, .add-bar and .btn-accent molecules into app.css and replace BEM color modifiers with bare atoms (bg-success, bg-accent, bg-danger, bg-accent-soft, text-accent, text-white). Rename the category-specific cat-add-bar to add-bar and the groceries page's sticky autocomplete bar to grocery-add-bar to avoid the collision. Cuts dcd duplicate lines from 1288 to 780. --- src/routes/+page.svelte | 68 +------------ src/routes/groceries/+page.svelte | 14 +-- src/routes/groceries/categories/+page.svelte | 39 +------- src/routes/projects/[id]/+page.svelte | 106 ++------------------- .../[projectId]/routine/[routineId]/+page.svelte | 66 ++----------- 5 files changed, 27 insertions(+), 266 deletions(-) (limited to 'src/routes') diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4d4777a..fd987ff 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,9 +6,9 @@ let name = $state(''); function scoreClass(score: number): string { - if (score >= 80) return 'score score--good'; - if (score >= 50) return 'score score--mid'; - return 'score score--bad'; + if (score >= 80) return 'score bg-success'; + if (score >= 50) return 'score bg-accent'; + return 'score bg-danger'; } @@ -18,7 +18,7 @@ {data.globalScore} -
+ -
+