feat(frontend-v2): migrate visible surfaces to theme-aware tokens

First pass of the dual-theme audit (premise #5). Replaces hardcoded
rgba(255, 255, 255, ...) with token references on the surfaces a
user sees first when toggling theme. Started at 429 hardcoded sites;
this commit migrates ~69 across 19 files. The rest is debt — see
CLAUDE.md §X.

Surfaces now theme-aware:
- AppShell: AppNav (classic-UI pill), UserMenu (avatar pill, chevron)
- Home: section header colors, CardRow head/count/arrows, empty state
- Galleries: GalleryToolbar (floating + kebab), Platform/Collection
  empty states, GameCard label, GameList row text/thumb,
  LetterGroupedGrid heading/load-more/empty, AlphaStrip letter colors,
  InfoPanel border/title
- Tiles: PlatformTile (background/border/hover/count),
  CollectionTile (name/count), CollectionMosaic (background/empty)
- Settings: SettingsShell (panel/subtitle), SettingsNav (panel/links),
  UserInterface (sections/cards/desc), MetadataSources (tiles/logos/
  indicators)

Tokens used: --r-color-bg-elevated, --r-color-surface,
--r-color-surface-hover, --r-color-border, --r-color-border-strong,
--r-color-fg, --r-color-fg-secondary, --r-color-fg-muted,
--r-color-fg-faint. The verbose `:global(.r-v2.r-v2-light) X { ... }`
override blocks collapse into single-token rules; tokens already
flip when html toggles between r-v2-dark and r-v2-light.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zurdiandClaude Opus 4.7 committed 2026-04-28 15:55:18 +00:00
1 parent ae07e7647a
commit f2edde0305
19 files changed
+85 -136

No files matched your search

@@ -141,14 +141,14 @@ const activeTab = computed<TabId | null>(() => {
/* Ghost-pill styling for the "classic UI" button (matches the old RIconBtn
ghost variant — translucent glass, subtle border). */
.r-v2-nav__classic {
background: rgba(255, 255, 255, 0.08) !important;
border: 1px solid rgba(255, 255, 255, 0.12) !important;
color: rgba(255, 255, 255, 0.8) !important;
background: var(--r-color-surface) !important;
border: 1px solid var(--r-color-border-strong) !important;
color: var(--r-color-fg-secondary) !important;
opacity: 1;
}
.r-v2-nav__classic:hover {
background: rgba(255, 255, 255, 0.16) !important;
color: #fff !important;
background: var(--r-color-surface-hover) !important;
color: var(--r-color-fg) !important;
}
@media (max-width: 768px) {
@@ -240,8 +240,8 @@ async function onLogout() {
<style scoped>
.r-v2-user {
background: rgba(255, 255, 255, 0.07) !important;
border: 1px solid rgba(255, 255, 255, 0.11) !important;
background: var(--r-color-surface) !important;
border: 1px solid var(--r-color-border-strong) !important;
border-radius: var(--r-radius-pill) !important;
padding: 3px 12px 3px 3px !important;
color: var(--r-color-fg) !important;
@@ -252,7 +252,7 @@ async function onLogout() {
}
.r-v2-user:hover {
background: rgba(255, 255, 255, 0.12) !important;
background: var(--r-color-surface-hover) !important;
}
.r-v2-user :deep(.v-btn__content) {
@@ -262,7 +262,7 @@ async function onLogout() {
}
.r-v2-user__chevron {
color: rgba(255, 255, 255, 0.45);
color: var(--r-color-fg-muted);
}
.r-v2-user__avatar {
@@ -71,7 +71,7 @@ const mosaicSlots = computed(() => {
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
overflow: hidden;
background: rgba(255, 255, 255, 0.04);
background: var(--r-color-bg-elevated);
width: 100%;
}
@@ -92,13 +92,6 @@ const mosaicSlots = computed(() => {
grid-row: 1 / -1;
display: grid;
place-items: center;
color: rgba(255, 255, 255, 0.15);
}
:global(.r-v2.r-v2-light) .coll-mosaic {
background: rgba(17, 17, 23, 0.05);
}
:global(.r-v2.r-v2-light) .coll-mosaic__empty {
color: rgba(17, 17, 23, 0.2);
color: var(--r-color-fg-faint);
}
</style>
@@ -137,7 +137,7 @@ const morphStyle = computed(() =>
0 0 18px rgba(139, 116, 232, 0.55);
}
.coll-tile:focus-visible .coll-tile__name {
color: #fff;
color: var(--r-color-fg);
}
.coll-tile__kind {
@@ -157,27 +157,19 @@ const morphStyle = computed(() =>
.coll-tile__name {
font-size: 12.5px;
font-weight: var(--r-font-weight-semibold);
color: rgba(255, 255, 255, 0.85);
color: var(--r-color-fg-secondary);
padding: 0 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
:global(.r-v2.r-v2-light) .coll-tile__name {
color: rgba(17, 17, 23, 0.85);
}
.coll-tile__count {
font-size: 11px;
color: rgba(255, 255, 255, 0.35);
color: var(--r-color-fg-muted);
padding: 0 2px;
}
:global(.r-v2.r-v2-light) .coll-tile__count {
color: rgba(17, 17, 23, 0.45);
}
@media (max-width: 768px) {
.coll-tile--row {
width: 120px;
@@ -91,7 +91,7 @@ function isActive(letter: string): boolean {
font-family: inherit;
font-size: 10px;
font-weight: var(--r-font-weight-bold);
color: rgba(255, 255, 255, 0.14);
color: var(--r-color-fg-faint);
cursor: default;
line-height: 1;
padding: 2.5px 0;
@@ -104,12 +104,12 @@ function isActive(letter: string): boolean {
}
.alpha-strip__btn--has {
color: rgba(255, 255, 255, 0.5);
color: var(--r-color-fg-muted);
cursor: pointer;
}
.alpha-strip__btn--has:hover {
color: #fff;
background: rgba(255, 255, 255, 0.1);
color: var(--r-color-fg);
background: var(--r-color-surface);
}
/* Scroll-spied letter — primary brand colour to stand out against the
@@ -117,7 +117,7 @@ function isActive(letter: string): boolean {
.alpha-strip__btn--current,
.alpha-strip__btn--has.alpha-strip__btn--current {
color: var(--r-color-brand-primary) !important;
background: rgba(255, 255, 255, 0.15);
background: var(--r-color-surface-hover);
}
.alpha-strip__btn--has.alpha-strip__btn--current:hover {
color: var(--r-color-brand-primary-hover) !important;
@@ -216,8 +216,8 @@ function setSearch(value: string) {
right: 14px;
z-index: 5;
padding: 4px;
background: rgba(7, 7, 15, 0.65);
border: 1px solid rgba(255, 255, 255, 0.08);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-pill);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
@@ -263,10 +263,10 @@ function setSearch(value: string) {
width: 32px !important;
height: 32px !important;
padding: 0 !important;
border: 1px solid rgba(255, 255, 255, 0.08) !important;
background: rgba(255, 255, 255, 0.05) !important;
border: 1px solid var(--r-color-border) !important;
background: var(--r-color-bg-elevated) !important;
border-radius: 50% !important;
color: rgba(255, 255, 255, 0.7) !important;
color: var(--r-color-fg-secondary) !important;
transition:
background var(--r-motion-fast) var(--r-motion-ease-out),
color var(--r-motion-fast) var(--r-motion-ease-out);
@@ -276,16 +276,7 @@ function setSearch(value: string) {
min-width: 0;
}
.gallery-toolbar__kebab:hover {
background: rgba(255, 255, 255, 0.12) !important;
color: #fff !important;
}
:global(.r-v2.r-v2-light) .gallery-toolbar__kebab {
border-color: rgba(17, 17, 23, 0.08) !important;
background: rgba(17, 17, 23, 0.05) !important;
color: rgba(17, 17, 23, 0.7) !important;
}
:global(.r-v2.r-v2-light) .gallery-toolbar__kebab:hover {
background: rgba(17, 17, 23, 0.12) !important;
background: var(--r-color-surface-hover) !important;
color: var(--r-color-fg) !important;
}
</style>
@@ -373,7 +373,7 @@ const morphStyle = computed(() => {
.r-gc__label {
margin-top: 7px;
font-size: 11.5px;
color: rgba(255, 255, 255, 0.55);
color: var(--r-color-fg-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -384,7 +384,7 @@ const morphStyle = computed(() => {
.r-gc:hover .r-gc__label,
.r-gc:focus-visible .r-gc__label,
.r-gc--focused .r-gc__label {
color: rgba(255, 255, 255, 0.9);
color: var(--r-color-fg);
}
/* ── Hero (16:9) variant ──────────────────────────────────── */
@@ -263,7 +263,7 @@ function ratingValue(rom: SimpleRom): string {
flex-shrink: 0;
border-radius: 4px;
overflow: hidden;
background: rgba(255, 255, 255, 0.06);
background: var(--r-color-surface);
display: grid;
place-items: center;
}
@@ -278,7 +278,7 @@ function ratingValue(rom: SimpleRom): string {
.game-list__thumb-fallback {
font-size: 10px;
font-weight: var(--r-font-weight-bold);
color: rgba(255, 255, 255, 0.4);
color: var(--r-color-fg-muted);
}
.game-list__meta {
@@ -291,7 +291,7 @@ function ratingValue(rom: SimpleRom): string {
.game-list__name {
font-size: 13px;
font-weight: var(--r-font-weight-medium);
color: rgba(255, 255, 255, 0.92);
color: var(--r-color-fg);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -300,7 +300,7 @@ function ratingValue(rom: SimpleRom): string {
.game-list__filename {
font-size: 11px;
color: rgba(255, 255, 255, 0.35);
color: var(--r-color-fg-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -50,14 +50,10 @@ withDefaults(defineProps<Props>(), {
align-items: center;
gap: 40px;
padding: 28px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
border-bottom: 1px solid var(--r-color-border);
margin-bottom: 12px;
}
:global(.r-v2.r-v2-light) .info-panel {
border-bottom-color: rgba(17, 17, 23, 0.08);
}
.info-panel--no-border {
border-bottom: 0;
}
@@ -82,15 +78,11 @@ withDefaults(defineProps<Props>(), {
font-size: var(--r-font-size-3xl);
font-weight: var(--r-font-weight-extrabold);
letter-spacing: -0.025em;
color: #fff;
color: var(--r-color-fg);
line-height: 1.1;
margin: 0 0 10px 0;
}
:global(.r-v2.r-v2-light) .info-panel__title {
color: var(--r-color-fg);
}
.info-panel__tags {
display: flex;
gap: 7px;
@@ -90,7 +90,7 @@ defineEmits<{ (e: "load-more"): void }>();
font-weight: var(--r-font-weight-bold);
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.22);
color: var(--r-color-fg-faint);
margin-bottom: 12px;
}
@@ -104,9 +104,9 @@ defineEmits<{ (e: "load-more"): void }>();
margin: 24px auto 0;
display: flex;
appearance: none;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.12);
color: rgba(255, 255, 255, 0.85);
background: var(--r-color-surface);
border: 1px solid var(--r-color-border-strong);
color: var(--r-color-fg-secondary);
border-radius: var(--r-radius-pill);
padding: 8px 22px;
font-size: 13px;
@@ -115,7 +115,7 @@ defineEmits<{ (e: "load-more"): void }>();
font-family: inherit;
}
.r-v2-lgg__more:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.14);
background: var(--r-color-surface-hover);
}
.r-v2-lgg__more:disabled {
opacity: 0.5;
@@ -124,7 +124,7 @@ defineEmits<{ (e: "load-more"): void }>();
.r-v2-lgg__empty {
padding: 80px 0;
color: rgba(255, 255, 255, 0.25);
color: var(--r-color-fg-faint);
font-size: 13.5px;
text-align: center;
}
+6 -9
View File
@@ -153,10 +153,7 @@ onMounted(() => {
/* gap is driven inline via the --card-row icon gap prop. */
padding: 0 var(--r-row-pad);
margin-bottom: 12px;
color: rgba(255, 255, 255, 0.88);
}
:global(.r-v2.r-v2-light) .card-row__head {
color: rgba(17, 17, 23, 0.88);
color: var(--r-color-fg-secondary);
}
/* Icon slot — sizes to its content so the caller's RIcon `size` drives
@@ -182,7 +179,7 @@ onMounted(() => {
.card-row__count {
font-size: 12px;
font-weight: var(--r-font-weight-regular);
color: rgba(255, 255, 255, 0.3);
color: var(--r-color-fg-faint);
margin-left: 4px;
}
@@ -210,7 +207,7 @@ onMounted(() => {
display: grid;
place-items: center;
cursor: pointer;
color: rgba(255, 255, 255, 0.85);
color: var(--r-color-fg-secondary);
transition:
color 0.2s,
opacity 0.2s;
@@ -218,12 +215,12 @@ onMounted(() => {
.card-row__arrow--left {
left: 0;
background: linear-gradient(to right, rgba(7, 7, 15, 0.9), transparent);
background: linear-gradient(to right, var(--r-color-bg), transparent);
border-radius: 0 6px 6px 0;
}
.card-row__arrow--right {
right: 0;
background: linear-gradient(to left, rgba(7, 7, 15, 0.9), transparent);
background: linear-gradient(to left, var(--r-color-bg), transparent);
border-radius: 6px 0 0 6px;
}
@@ -232,7 +229,7 @@ onMounted(() => {
}
.card-row__arrow:hover {
color: #fff;
color: var(--r-color-fg);
}
@media (max-width: 768px) {
@@ -99,10 +99,10 @@ const morphStyle = computed(() =>
align-items: center;
gap: 12px;
padding: 24px 16px 18px;
background: rgba(255, 255, 255, 0.045);
border: 1px solid rgba(255, 255, 255, 0.07);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-card);
color: rgba(255, 255, 255, 0.75);
color: var(--r-color-fg-secondary);
text-decoration: none;
cursor: pointer;
transition:
@@ -111,25 +111,13 @@ const morphStyle = computed(() =>
transform var(--r-motion-fast);
}
:global(.r-v2.r-v2-light) .plat-tile {
background: rgba(17, 17, 23, 0.035);
border-color: rgba(17, 17, 23, 0.07);
color: rgba(17, 17, 23, 0.75);
}
.plat-tile:hover,
.plat-tile:focus-visible {
background: rgba(255, 255, 255, 0.09);
border-color: rgba(255, 255, 255, 0.18);
background: var(--r-color-surface);
border-color: var(--r-color-border-strong);
transform: translateY(-2px);
}
:global(.r-v2.r-v2-light) .plat-tile:hover,
:global(.r-v2.r-v2-light) .plat-tile:focus-visible {
background: rgba(17, 17, 23, 0.07);
border-color: rgba(17, 17, 23, 0.15);
}
/* Keyboard / gamepad focus — stronger border + stacked brand glow so
the focused tile reads distinctly from a hover. */
.plat-tile:focus-visible {
@@ -171,11 +159,7 @@ const morphStyle = computed(() =>
.plat-tile__count {
font-size: 11px;
color: rgba(255, 255, 255, 0.35);
}
:global(.r-v2.r-v2-light) .plat-tile__count {
color: rgba(17, 17, 23, 0.45);
color: var(--r-color-fg-muted);
}
@media (max-width: 768px) {
@@ -94,8 +94,8 @@ const entries = computed<Entry[]>(() => [
flex-wrap: wrap;
gap: 6px;
padding: 6px;
background: rgba(13, 17, 23, 0.55);
border: 1px solid rgba(255, 255, 255, 0.06);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
@@ -108,7 +108,7 @@ const entries = computed<Entry[]>(() => [
padding: 8px 14px;
border-radius: var(--r-radius-pill);
text-decoration: none;
color: rgba(255, 255, 255, 0.65);
color: var(--r-color-fg-secondary);
font-size: 13px;
font-weight: var(--r-font-weight-medium);
transition:
@@ -117,8 +117,8 @@ const entries = computed<Entry[]>(() => [
white-space: nowrap;
}
.r-v2-settings-nav__link:hover {
background: rgba(255, 255, 255, 0.06);
color: rgba(255, 255, 255, 0.9);
background: var(--r-color-surface);
color: var(--r-color-fg);
}
.r-v2-settings-nav__link--active {
background: rgba(139, 116, 232, 0.18);
@@ -105,7 +105,7 @@ setBgArt(null);
.r-v2-settings__subtitle {
margin: 2px 0 0;
color: rgba(255, 255, 255, 0.55);
color: var(--r-color-fg-secondary);
font-size: var(--r-font-size-sm);
max-width: 560px;
}
@@ -116,8 +116,8 @@ setBgArt(null);
}
.r-v2-settings__panel {
background: rgba(13, 17, 23, 0.7);
border: 1px solid rgba(255, 255, 255, 0.07);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
+1 -1
View File
@@ -358,7 +358,7 @@ function onListSort(options: { sortBy: SortEntry[] }) {
.r-v2-coll__empty {
padding: 80px 0;
color: rgba(255, 255, 255, 0.25);
color: var(--r-color-fg-faint);
font-size: 13.5px;
text-align: center;
}
+1 -1
View File
@@ -350,7 +350,7 @@ function onListSort(options: { sortBy: SortEntry[] }) {
.r-v2-plat__empty {
padding: 80px 0;
color: rgba(255, 255, 255, 0.25);
color: var(--r-color-fg-faint);
font-size: 13.5px;
text-align: center;
}
+1 -1
View File
@@ -227,7 +227,7 @@ function collectionCovers(pathCovers: string[] | undefined): string[] {
}
.r-v2-home__empty {
color: rgba(255, 255, 255, 0.25);
color: var(--r-color-fg-faint);
font-size: 13px;
padding: 24px var(--r-row-pad);
}
@@ -230,8 +230,8 @@ onMounted(() => {
flex-direction: column;
gap: 12px;
padding: 14px;
background: rgba(13, 17, 23, 0.7);
border: 1px solid rgba(255, 255, 255, 0.07);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
@@ -257,8 +257,8 @@ onMounted(() => {
width: 40px;
height: 40px;
border-radius: var(--r-radius-sm);
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
display: grid;
place-items: center;
padding: 4px;
@@ -278,12 +278,12 @@ onMounted(() => {
margin: 0;
font-size: 14px;
font-weight: var(--r-font-weight-semibold);
color: rgba(255, 255, 255, 0.9);
color: var(--r-color-fg);
}
.r-v2-meta__status {
margin: 2px 0 0;
font-size: 11px;
color: rgba(255, 255, 255, 0.55);
color: var(--r-color-fg-secondary);
}
.r-v2-meta__indicators {
@@ -300,9 +300,9 @@ onMounted(() => {
border-radius: var(--r-radius-pill);
font-size: 11px;
font-weight: var(--r-font-weight-medium);
background: rgba(255, 255, 255, 0.04);
color: rgba(255, 255, 255, 0.55);
border: 1px solid rgba(255, 255, 255, 0.07);
background: var(--r-color-bg-elevated);
color: var(--r-color-fg-secondary);
border: 1px solid var(--r-color-border);
}
.r-v2-meta__indicator--on {
background: rgba(34, 197, 94, 0.12);
@@ -320,7 +320,7 @@ onMounted(() => {
color: #facc15;
}
.r-v2-meta__indicator--muted {
background: rgba(255, 255, 255, 0.03);
color: rgba(255, 255, 255, 0.35);
background: var(--r-color-bg-elevated);
color: var(--r-color-fg-muted);
}
</style>
@@ -141,8 +141,8 @@ const uiVersionCards = computed(() => [
<style scoped>
.r-v2-ui__section {
background: rgba(13, 17, 23, 0.7);
border: 1px solid rgba(255, 255, 255, 0.07);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
@@ -156,7 +156,7 @@ const uiVersionCards = computed(() => [
display: flex;
align-items: center;
gap: 8px;
color: rgba(255, 255, 255, 0.7);
color: var(--r-color-fg-secondary);
}
.r-v2-ui__section-head h2 {
margin: 0;
@@ -164,12 +164,12 @@ const uiVersionCards = computed(() => [
font-weight: var(--r-font-weight-semibold);
text-transform: uppercase;
letter-spacing: 0.06em;
color: rgba(255, 255, 255, 0.85);
color: var(--r-color-fg);
}
.r-v2-ui__desc {
margin: 0;
color: rgba(255, 255, 255, 0.55);
color: var(--r-color-fg-secondary);
font-size: 13px;
line-height: 1.5;
max-width: 640px;
@@ -190,10 +190,10 @@ const uiVersionCards = computed(() => [
justify-content: center;
gap: 6px;
padding: 14px 16px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-md);
color: rgba(255, 255, 255, 0.7);
color: var(--r-color-fg-secondary);
cursor: pointer;
text-align: left;
transition:
@@ -203,15 +203,15 @@ const uiVersionCards = computed(() => [
}
.r-v2-ui__version-card:hover,
.r-v2-ui__theme-card:hover {
background: rgba(255, 255, 255, 0.07);
border-color: rgba(255, 255, 255, 0.14);
background: var(--r-color-surface);
border-color: var(--r-color-border-strong);
transform: translateY(-1px);
}
.r-v2-ui__version-card--active,
.r-v2-ui__theme-card--active {
background: rgba(139, 116, 232, 0.14);
border-color: rgba(139, 116, 232, 0.45);
color: #fff;
color: var(--r-color-fg);
}
.r-v2-ui__version-title {
@@ -220,7 +220,7 @@ const uiVersionCards = computed(() => [
}
.r-v2-ui__version-blurb {
font-size: 12px;
color: rgba(255, 255, 255, 0.5);
color: var(--r-color-fg-muted);
}
.r-v2-ui__version-dot {