mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 18:32:53 +02:00
refactor(theming): migrate remaining 738 token violations across routes + components
Expand validate-theme-tokens.mjs scope from ListViews only to all
lib/modules/**/*.svelte and routes/(app)/**/*.svelte. Add a second rule
banning the neutral Tailwind palette (gray/slate/zinc/neutral/stone-N)
— these should be theme tokens (bg-card, bg-muted, text-foreground,
text-muted-foreground, border-border) instead.
Apply one-shot codemod (scripts/migrate-theme-tokens.mjs) that
replaces:
bg-gray-800/900 → bg-card
bg-gray-600/700 → bg-muted (with opacity preserved)
border-gray-600..900 → border-border
text-gray-800/900 → text-foreground
text-gray-300 → text-foreground/90
text-gray-400/500/700 → text-muted-foreground
placeholder-gray-* → placeholder:text-muted-foreground/60
bg/border-white/N → bg-muted/N, border-border/N
text-white/70-90 → text-foreground
text-white/40-60 → text-muted-foreground
text-white/10-30 → text-muted-foreground/70
42 files touched; biggest: presi/deck/[id] (91 subs), uload/analytics
(58), uload/+page (53), presi/+page (47), who/PlayView (35),
skilltree/Edit+AddXpModal (28 each), context/* (115 across 4 pages),
uload/links+tags (50 across 2).
Brand-literal overlays in moodlit/components/mood/{MoodFullscreen,
MoodCard,CreateMoodDialog}.svelte stay unmigrated — they render on
vivid colour gradients. Validator exempts these 3 files from the
white-alpha rule; they still obey the neutral-palette rule.
Result: 527 files pass validate:theme-tokens; svelte-check clean with
0 errors.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
db2023a77f
commit
7d6a340b13
44 changed files with 747 additions and 460 deletions
|
|
@ -143,8 +143,8 @@
|
|||
<div class="meta">
|
||||
<div class="meta-badges">
|
||||
<span class="badge {catInfo.color}">{catInfo.label}</span>
|
||||
<span class="badge bg-white/10">{DIFFICULTY_LABELS[guide.difficulty]}</span>
|
||||
<span class="badge bg-white/10">{guide.estimatedMinutes} min</span>
|
||||
<span class="badge bg-muted/10">{DIFFICULTY_LABELS[guide.difficulty]}</span>
|
||||
<span class="badge bg-muted/10">{guide.estimatedMinutes} min</span>
|
||||
</div>
|
||||
<h1 class="title">{guide.title}</h1>
|
||||
<p class="description">{guide.description}</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue