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,
|
*::before,
|
||||||
*::after {
|
*::after {
|
||||||
@@ -13,5 +29,5 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #05050a;
|
background: var(--bg-space);
|
||||||
}
|
}
|
||||||
@@ -1480,7 +1480,7 @@
|
|||||||
<style>
|
<style>
|
||||||
/* Global focus indicators for accessibility */
|
/* Global focus indicators for accessibility */
|
||||||
*:focus-visible {
|
*:focus-visible {
|
||||||
outline: 2px solid #ffd700;
|
outline: 2px solid var(--color-gold);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1491,14 +1491,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.canvas-container:focus-visible {
|
.canvas-container:focus-visible {
|
||||||
outline: 3px solid #ffd700;
|
outline: 3px solid var(--color-gold);
|
||||||
outline-offset: -3px;
|
outline-offset: -3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tooltip Styles */
|
/* Tooltip Styles */
|
||||||
.tooltip {
|
.tooltip {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: linear-gradient(145deg, #1a1a2e 0%, #12121a 100%);
|
background: linear-gradient(145deg, var(--panel-from) 0%, #12121a 100%);
|
||||||
border: 1px solid var(--node-color);
|
border: 1px solid var(--node-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
@@ -1530,7 +1530,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tooltip p {
|
.tooltip p {
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
margin: 0 0 0.5rem 0;
|
margin: 0 0 0.5rem 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@@ -1574,7 +1574,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
|
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
|
||||||
border: 1px solid var(--node-color);
|
border: 1px solid var(--node-color);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
@@ -1631,7 +1631,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal p {
|
.modal p {
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
@@ -1673,7 +1673,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.about-me {
|
.about-me {
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
margin: 0 0 1rem 0;
|
margin: 0 0 1rem 0;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
@@ -1757,7 +1757,7 @@
|
|||||||
.highlights {
|
.highlights {
|
||||||
margin: 0.75rem 0 0 0;
|
margin: 0.75rem 0 0 0;
|
||||||
padding-left: 1.2rem;
|
padding-left: 1.2rem;
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1907,14 +1907,14 @@
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-indicator p {
|
.loading-indicator p {
|
||||||
font-family: 'Cinzel Decorative', 'Trajan Pro', serif;
|
font-family: 'Cinzel Decorative', 'Trajan Pro', serif;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
|
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1922,7 +1922,7 @@
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border: 4px solid rgba(255, 215, 0, 0.2);
|
border: 4px solid rgba(255, 215, 0, 0.2);
|
||||||
border-top: 4px solid #ffd700;
|
border-top: 4px solid var(--color-gold);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@@ -1983,7 +1983,7 @@
|
|||||||
|
|
||||||
.welcome-title h1 {
|
.welcome-title h1 {
|
||||||
font-size: 2.5rem;
|
font-size: 2.5rem;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-shadow:
|
text-shadow:
|
||||||
0 0 20px rgba(255, 215, 0, 0.8),
|
0 0 20px rgba(255, 215, 0, 0.8),
|
||||||
@@ -1994,7 +1994,7 @@
|
|||||||
|
|
||||||
.welcome-title p {
|
.welcome-title p {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
margin: 0.5rem 0 0 0;
|
margin: 0.5rem 0 0 0;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.3em;
|
letter-spacing: 0.3em;
|
||||||
@@ -2038,8 +2038,8 @@
|
|||||||
left: 20px;
|
left: 20px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
|
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
|
||||||
border: 2px solid #ffd700;
|
border: 2px solid var(--color-gold);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 950;
|
z-index: 950;
|
||||||
@@ -2047,7 +2047,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 0 20px rgba(255, 215, 0, 0.3),
|
0 0 20px rgba(255, 215, 0, 0.3),
|
||||||
0 4px 12px rgba(0, 0, 0, 0.5);
|
0 4px 12px rgba(0, 0, 0, 0.5);
|
||||||
@@ -2079,8 +2079,8 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
|
background: linear-gradient(145deg, var(--panel-from) 0%, var(--panel-to) 100%);
|
||||||
border-right: 2px solid #ffd700;
|
border-right: 2px solid var(--color-gold);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
4px 0 40px rgba(255, 215, 0, 0.3),
|
4px 0 40px rgba(255, 215, 0, 0.3),
|
||||||
8px 0 80px rgba(255, 215, 0, 0.15);
|
8px 0 80px rgba(255, 215, 0, 0.15);
|
||||||
@@ -2103,7 +2103,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stats-panel::-webkit-scrollbar-thumb {
|
.stats-panel::-webkit-scrollbar-thumb {
|
||||||
background: linear-gradient(180deg, #ffd700 0%, #b7941f 100%);
|
background: linear-gradient(180deg, var(--color-gold) 0%, #b7941f 100%);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 2px solid rgba(0, 0, 0, 0.3);
|
border: 2px solid rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
@@ -2138,7 +2138,7 @@
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 3px solid #ffd700;
|
border: 3px solid var(--color-gold);
|
||||||
box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
|
box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
|
||||||
margin: 0 auto 1rem;
|
margin: 0 auto 1rem;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
@@ -2150,7 +2150,7 @@
|
|||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-item {
|
.stat-item {
|
||||||
@@ -2161,14 +2161,14 @@
|
|||||||
|
|
||||||
.stat-label {
|
.stat-label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
|
text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.character-name {
|
.character-name {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
|
text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@@ -2177,7 +2177,7 @@
|
|||||||
|
|
||||||
.character-title {
|
.character-title {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2195,7 +2195,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.proficiency-summary h3 {
|
.proficiency-summary h3 {
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@@ -2215,7 +2215,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.proficiency-count {
|
.proficiency-count {
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2250,7 +2250,7 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #f9a825;
|
color: var(--color-skills);
|
||||||
text-shadow: 0 0 10px rgba(249, 168, 37, 0.3);
|
text-shadow: 0 0 10px rgba(249, 168, 37, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2289,7 +2289,7 @@
|
|||||||
|
|
||||||
.skill-item:hover {
|
.skill-item:hover {
|
||||||
background: rgba(255, 255, 255, 0.05);
|
background: rgba(255, 255, 255, 0.05);
|
||||||
border-left-color: #f9a825;
|
border-left-color: var(--color-skills);
|
||||||
}
|
}
|
||||||
|
|
||||||
.skill-item-icon {
|
.skill-item-icon {
|
||||||
@@ -2306,14 +2306,14 @@
|
|||||||
|
|
||||||
.skill-proficiency {
|
.skill-proficiency {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
color: #a8a8b8;
|
color: var(--text-muted);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.proficiency-stars {
|
.proficiency-stars {
|
||||||
color: #ffd700;
|
color: var(--color-gold);
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2343,7 +2343,7 @@
|
|||||||
height: 85dvh;
|
height: 85dvh;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-top: 2px solid #ffd700;
|
border-top: 2px solid var(--color-gold);
|
||||||
border-radius: 16px 16px 0 0;
|
border-radius: 16px 16px 0 0;
|
||||||
top: auto;
|
top: auto;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
Reference in new issue
Block a user