refactor: drive theme colors through CSS custom properties
Phase 2 (behavior-preserving): - Add :root color tokens to app.css mirroring theme.ts cssVars - Replace solid theme hex literals in SkillTree.svelte <style> with var(--..): #ffd700 -> --color-gold (x17), #a8a8b8 -> --text-muted (x8), #1a1a2e -> --panel-from, #0f0f1a -> --panel-to, #f9a825 -> --color-skills - body background now var(--bg-space) Values are identical to the literals; every referenced var has a :root definition. rgba() shadows and one-off grays/badge colors left as-is. check/lint/build all clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6c652e7138
commit
6091c62654
2 files changed
+48
-32
No files matched your search
+17
-1
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Theme tokens — single source of truth for colours is src/lib/theme.ts.
|
||||
* These custom properties mirror its `cssVars` map; keep the two in sync.
|
||||
*/
|
||||
:root {
|
||||
--color-gold: #ffd700;
|
||||
--color-experience: #4ecdc4;
|
||||
--color-projects: #ff6b6b;
|
||||
--color-skills: #f9a825;
|
||||
--color-education: #dda0dd;
|
||||
--bg-space: #05050a;
|
||||
--panel-from: #1a1a2e;
|
||||
--panel-to: #0f0f1a;
|
||||
--text-muted: #a8a8b8;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
@@ -13,5 +29,5 @@ body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background: #05050a;
|
||||
background: var(--bg-space);
|
||||
}
|
||||
Reference in new issue
Block a user