refactor(frontend-v2): use --r-space-* tokens for spacing in views

Convert every on-scale px spacing value in src/v2/views with
`eslint --fix` for `romm/no-spacing-literal`. That leaves none in v2,
so the rule moves into the v2 rule block and covers every SFC. Each
token resolves to the px it replaces, so the computed styles are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sam Dornan
2026-09-29 10:32:30 -05:00
parent 81e18db784
commit 15ba44ce25
24 changed files with 144 additions and 152 deletions

View File

@@ -76,4 +76,4 @@ If a literal would otherwise be needed, the answer is: **add a token** (steps ab
- Scoped `<style>` by default; unscoped only for teleport overrides.
- BEM-ish class names: `.feature__element--modifier`. Prefixes: `.r-v2-...` for app-shell surfaces outside components; `.r-...` for globally shared utilities/tokens.
- No utility-class framework (no Tailwind, no Vuetify): layout is plain CSS in the component's scoped block, with tokens (`var(--r-space-*)`, `var(--r-radius-*)`) for every value that has one.
- `romm/no-spacing-literal` (ESLint) flags a px value in `gap`, `margin*`, `padding*` or `inset*` that equals a `--r-space-*` step, in SFC styles and v2 `.css` files, and autofixes it (a negative becomes `calc(-1 * var(--r-space-N))`). Off-scale values stay as px. Its `files` list in `eslint.config.js` grows as each directory is converted.
- `romm/no-spacing-literal` (ESLint) flags a px value in `gap`, `margin*`, `padding*` or `inset*` that equals a `--r-space-*` step, in SFC styles and v2 `.css` files, and autofixes it (a negative becomes `calc(-1 * var(--r-space-N))`). Off-scale values stay as px.

View File

@@ -216,20 +216,12 @@ export default tseslint.config(
"romm/no-emdash-in-comment": "error",
"romm/no-color-literal": "error",
"romm/no-layout-media-query": "error",
"romm/no-spacing-literal": "error",
},
},
{
files: ["src/v2/**/*.css"],
languageOptions: { parser: cssParser },
},
// Widened directory by directory as each is converted to --r-space-* tokens.
{
files: [
"src/v2/**/*.css",
"src/v2/lib/**/*.vue",
"src/v2/layouts/**/*.vue",
"src/v2/components/**/*.vue",
],
plugins: { romm },
rules: { "romm/no-spacing-literal": "error" },
},

View File

@@ -415,14 +415,14 @@ function elapsedLabel(startedAt: string): string {
.r-v2-activity__head {
display: flex;
justify-content: flex-start;
margin-bottom: 20px;
margin-bottom: var(--r-space-5);
}
.r-v2-activity__total {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 6px 12px;
padding: 6px var(--r-space-3);
border-radius: var(--r-radius-pill);
background: var(--r-color-surface);
border: 1px solid var(--r-color-border);
@@ -471,22 +471,22 @@ function elapsedLabel(startedAt: string): string {
.r-v2-activity__grid {
display: flex;
flex-wrap: wrap;
gap: 20px 16px;
gap: var(--r-space-5) var(--r-space-4);
align-items: flex-start;
}
html[data-bp~="xs"] .r-v2-activity__grid {
gap: 16px 10px;
gap: var(--r-space-4) 10px;
}
/* Admin streaming-session panel: plain rows, not cards; these are
operational controls, not part of the presence board. */
.r-v2-activity__streaming {
margin-top: 32px;
margin-top: var(--r-space-8);
}
.r-v2-activity__streaming-title {
margin-bottom: 12px;
margin-bottom: var(--r-space-3);
font-size: var(--r-font-size-md);
font-weight: var(--r-font-weight-bold);
color: var(--r-color-fg);
@@ -495,7 +495,7 @@ html[data-bp~="xs"] .r-v2-activity__grid {
.r-v2-activity__streaming-list {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
margin: 0;
padding: 0;
list-style: none;
@@ -505,7 +505,7 @@ html[data-bp~="xs"] .r-v2-activity__grid {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
gap: var(--r-space-3);
padding: 10px 14px;
border-radius: var(--r-radius-card);
background: var(--r-color-surface);

View File

@@ -695,13 +695,13 @@ const showListHeader = computed(
/* Mirror the gallery shell's header→toolbar separator so the visual
rhythm matches Search / Platform / Collection ROM views. */
.r-v2-cidx__header-divider {
margin-bottom: 16px;
margin-bottom: var(--r-space-4);
}
.r-v2-cidx__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 20px 16px;
gap: var(--r-space-5) var(--r-space-4);
}
.r-v2-cidx__list :deep(.coll-list-row:last-child) {
@@ -716,8 +716,8 @@ const showListHeader = computed(
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-md);
padding: 18px 20px 22px;
margin-bottom: 24px;
padding: 18px var(--r-space-5) 22px;
margin-bottom: var(--r-space-6);
}
/* Section heading — small uppercase label at the top of each kind
@@ -739,7 +739,7 @@ const showListHeader = computed(
html[data-bp~="xs"] .r-v2-cidx__grid {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 16px 10px;
gap: var(--r-space-4) 10px;
}
html[data-bp~="xs"] .r-v2-cidx__panel {
padding: 14px 14px 18px;

View File

@@ -332,7 +332,7 @@ function formatTime(t: number) {
position: relative;
display: flex;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
padding: 10px 14px;
overflow: hidden;
border: 1px solid var(--r-color-border);
@@ -362,8 +362,8 @@ function formatTime(t: number) {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 16px;
gap: var(--r-space-3);
padding: var(--r-space-3) var(--r-space-4);
border-bottom: 1px solid var(--r-color-border);
}
.r-v2-ctrl__status-row:last-child {
@@ -442,7 +442,7 @@ function formatTime(t: number) {
color: var(--r-color-fg-muted);
}
.r-v2-ctrl__tag {
padding: 2px 8px;
padding: 2px var(--r-space-2);
background: var(--r-color-surface);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-pill);
@@ -458,7 +458,7 @@ function formatTime(t: number) {
align-items: center;
justify-content: center;
gap: 10px;
padding: 40px 16px 32px;
padding: var(--r-space-10) var(--r-space-4) var(--r-space-8);
color: var(--r-color-fg-muted);
text-align: center;
}
@@ -473,7 +473,7 @@ function formatTime(t: number) {
font-size: 12px !important;
}
.r-v2-ctrl__hint code {
padding: 1px 4px;
padding: 1px var(--r-space-1);
background: var(--r-color-surface);
border: 1px solid var(--r-color-border);
border-radius: 3px;
@@ -483,11 +483,11 @@ function formatTime(t: number) {
/* Axes (overflow > 4) ---------------------------------------------- */
.r-v2-ctrl__axes {
padding: 12px 16px 16px;
padding: var(--r-space-3) var(--r-space-4) var(--r-space-4);
border-top: 1px solid var(--r-color-border);
}
.r-v2-ctrl__axes-title {
margin: 0 0 8px;
margin: 0 0 var(--r-space-2);
font-size: 11px;
font-weight: var(--r-font-weight-bold);
text-transform: uppercase;
@@ -499,7 +499,7 @@ function formatTime(t: number) {
grid-template-columns: 64px 1fr 64px;
align-items: center;
gap: 10px;
padding: 4px 0;
padding: var(--r-space-1) 0;
font-size: 11px;
}
.r-v2-ctrl__axis-idx {
@@ -575,7 +575,7 @@ html[data-bp~="xs"] .r-v2-ctrl__legend {
border-bottom: 1px solid var(--r-color-border);
}
.r-v2-ctrl__log-hint code {
padding: 1px 4px;
padding: 1px var(--r-space-1);
background: var(--r-color-surface);
border-radius: 3px;
font-family: var(--r-font-family-mono, monospace);
@@ -594,9 +594,9 @@ html[data-bp~="xs"] .r-v2-ctrl__legend {
.r-v2-ctrl__log-row {
display: grid;
grid-template-columns: 100px 96px 1fr;
gap: 12px;
gap: var(--r-space-3);
align-items: center;
padding: 8px 14px;
padding: var(--r-space-2) 14px;
border-bottom: 1px solid var(--r-color-border);
font-size: 11px;
}
@@ -615,7 +615,7 @@ html[data-bp~="xs"] .r-v2-ctrl__legend {
color: var(--r-color-fg);
}
.r-v2-ctrl__log-empty {
padding: 28px 16px;
padding: var(--r-space-7) var(--r-space-4);
text-align: center;
color: var(--r-color-fg-muted);
font-size: 12px;

View File

@@ -314,7 +314,7 @@ async function deny() {
border: 1px solid var(--r-color-border-strong);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(22px);
padding: 32px;
padding: var(--r-space-8);
box-shadow:
0 22px 60px color-mix(in srgb, black 55%, transparent),
0 2px 6px color-mix(in srgb, black 30%, transparent);
@@ -324,21 +324,21 @@ async function deny() {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
gap: var(--r-space-4);
text-align: center;
}
.r-v2-devpair__form {
display: flex;
flex-direction: column;
gap: 16px;
gap: var(--r-space-4);
}
.r-v2-devpair__header {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
text-align: center;
}
@@ -398,7 +398,7 @@ async function deny() {
.r-v2-devpair__chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-devpair__identifier {
@@ -412,7 +412,7 @@ async function deny() {
.r-v2-devpair__scopes {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-devpair__label {
@@ -424,7 +424,7 @@ async function deny() {
.r-v2-devpair__scope-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
gap: var(--r-space-2);
max-height: 168px;
overflow-y: auto;
}
@@ -436,7 +436,7 @@ async function deny() {
.r-v2-devpair__actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 8px;
gap: var(--r-space-2);
margin-top: var(--r-space-2);
}
</style>

View File

@@ -405,13 +405,13 @@ const tabs = computed<RTabNavItem[]>(() => [
height: calc(100vh - var(--r-nav-h));
display: flex;
flex-direction: column;
padding-top: 20px;
padding-top: var(--r-space-5);
}
.r-v2-det__topbar {
position: relative;
z-index: 2;
padding: 20px var(--r-row-pad) 0;
padding: var(--r-space-5) var(--r-row-pad) 0;
}
.r-v2-det__body {
@@ -424,7 +424,7 @@ const tabs = computed<RTabNavItem[]>(() => [
scroll. The cover keeps its natural height via `align-self:
flex-start` declared on CoverColumn itself. */
align-items: stretch;
padding: 0 var(--r-row-pad) 32px;
padding: 0 var(--r-row-pad) var(--r-space-8);
gap: 52px;
min-height: 0;
/* Cap the canvas so the cover + info column stay readable on
@@ -447,7 +447,7 @@ const tabs = computed<RTabNavItem[]>(() => [
}
.r-v2-det__tabs {
margin: 14px 0 16px;
margin: 14px 0 var(--r-space-4);
}
.r-v2-det__panel {
@@ -489,14 +489,14 @@ const tabs = computed<RTabNavItem[]>(() => [
AppLayout document scroll takes over (its bottom-nav padding clears the last
content). Every fixed-height / internal-scroll rule is unwound below. */
html[data-bp~="sm-and-down"] .r-v2-det {
padding-top: 8px;
padding-top: var(--r-space-2);
height: auto;
}
html[data-bp~="sm-and-down"] .r-v2-det__body {
flex-direction: column;
align-items: stretch;
gap: 14px;
padding: 8px var(--r-row-pad) 16px;
padding: var(--r-space-2) var(--r-row-pad) var(--r-space-4);
flex: none;
min-height: 0;
}
@@ -512,6 +512,6 @@ html[data-bp~="sm-and-down"] .r-v2-det__panel {
padding-right: 0;
}
html[data-bp~="sm-and-down"] .r-v2-det__tabs {
margin: 28px 0 12px;
margin: var(--r-space-7) 0 var(--r-space-3);
}
</style>

View File

@@ -640,7 +640,7 @@ function collectionCovers(c: {
<style scoped>
.r-v2-home {
padding: 16px 0 48px;
padding: var(--r-space-4) 0 var(--r-space-12);
display: flex;
flex-direction: column;
gap: 6px;
@@ -649,7 +649,7 @@ function collectionCovers(c: {
.r-v2-home__empty {
color: var(--r-color-fg-faint);
font-size: 13px;
padding: 24px var(--r-row-pad);
padding: var(--r-space-6) var(--r-row-pad);
}
/* Stacks the cover over its reason caption. The card sets its own width, so
@@ -657,7 +657,7 @@ function collectionCovers(c: {
.r-v2-home__rec {
display: flex;
flex-direction: column;
gap: 4px;
gap: var(--r-space-1);
flex-shrink: 0;
}

View File

@@ -207,14 +207,14 @@ function onDelete(fileId: number, romId: number) {
}
.jukebox__sidebar-head {
padding: 14px 16px;
padding: 14px var(--r-space-4);
border-bottom: 1px solid var(--r-color-border);
}
.jukebox__entries {
flex: 1;
overflow-y: auto;
padding: 8px;
padding: var(--r-space-2);
}
.jukebox__entry-icon {
@@ -257,7 +257,7 @@ html[data-bp~="xs"] .jukebox__sidebar-head {
}
html[data-bp~="xs"] .jukebox__entries {
padding: 8px;
padding: var(--r-space-2);
}
html[data-bp~="xs"] .jukebox__entries :deep(.r-list-item) {

View File

@@ -226,6 +226,6 @@ const launchRows = computed<{ title: string; tiles: LaunchTile[] }[]>(() => [
}
html[data-bp~="xs"] .jukebox__home {
padding: var(--r-space-4) 0 40px;
padding: var(--r-space-4) 0 var(--r-space-10);
}
</style>

View File

@@ -147,7 +147,7 @@ async function copyCode() {
border: 1px solid var(--r-color-border-strong);
border-radius: var(--r-radius-lg);
backdrop-filter: blur(22px);
padding: 40px 32px;
padding: var(--r-space-10) var(--r-space-8);
box-shadow:
0 22px 60px color-mix(in srgb, black 55%, transparent),
0 2px 6px color-mix(in srgb, black 30%, transparent);
@@ -157,7 +157,7 @@ async function copyCode() {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
gap: var(--r-space-4);
text-align: center;
}
@@ -195,13 +195,13 @@ async function copyCode() {
background: var(--r-color-surface);
border: 1px solid var(--r-color-border-strong);
border-radius: var(--r-radius-md);
padding: 18px 28px;
margin: 4px 0;
padding: 18px var(--r-space-7);
margin: var(--r-space-1) 0;
user-select: all;
}
.r-v2-pair__hint {
margin: 4px 0 0;
margin: var(--r-space-1) 0 0;
color: var(--r-color-fg-muted);
font-size: var(--r-font-size-sm);
max-width: 360px;

View File

@@ -612,13 +612,13 @@ const groupedBuckets = computed<Bucket[] | null>(() => {
/* Mirror the gallery shell's header→toolbar separator so the visual
rhythm matches Search / Platform / Collection ROM views. */
.r-v2-pidx__header-divider {
margin-bottom: 16px;
margin-bottom: var(--r-space-4);
}
.r-v2-pidx__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 16px;
gap: var(--r-space-4);
}
.r-v2-pidx__list :deep(.plat-list-row:last-child) {
@@ -632,7 +632,7 @@ const groupedBuckets = computed<Bucket[] | null>(() => {
creates breathing room above the grid; vertical rhythm between
sibling sections lives on the heading's `margin-top`. */
.r-v2-pidx__group-heading {
margin: 24px 0 12px;
margin: var(--r-space-6) 0 var(--r-space-3);
font-size: 11px;
font-weight: var(--r-font-weight-bold);
letter-spacing: 0.1em;
@@ -640,7 +640,7 @@ const groupedBuckets = computed<Bucket[] | null>(() => {
color: var(--r-color-fg-faint);
}
.r-v2-pidx__group-heading:first-child {
margin-top: 4px;
margin-top: var(--r-space-1);
}
html[data-bp~="xs"] .r-v2-pidx__grid {

View File

@@ -293,12 +293,12 @@ onMounted(() => {
}
.r-v2-desktop__error {
margin: 24px auto;
margin: var(--r-space-6) auto;
max-width: 560px;
}
.r-v2-desktop__ended-reason {
margin-top: 8px;
margin-top: var(--r-space-2);
}
.r-v2-desktop__spinner {

View File

@@ -1117,7 +1117,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
.r-v2-ejs {
position: relative;
min-height: calc(100vh - var(--r-nav-h));
padding: 32px var(--r-row-pad) 48px;
padding: var(--r-space-8) var(--r-row-pad) var(--r-space-12);
}
/* Pre-game layout: hero | resume | setup. The resume column owns
@@ -1129,7 +1129,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
220px,
240px
);
gap: 20px;
gap: var(--r-space-5);
max-width: 1280px;
margin: 0 auto;
align-items: stretch;
@@ -1163,7 +1163,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
}
.r-v2-ejs__panel-head--label {
justify-content: flex-start;
gap: 8px;
gap: var(--r-space-2);
align-items: center;
text-transform: uppercase;
letter-spacing: 0.06em;
@@ -1174,8 +1174,8 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
/* ── Hero column ─────────────────────────────────────────── */
.r-v2-ejs__hero {
padding: 16px;
gap: 12px;
padding: var(--r-space-4);
gap: var(--r-space-3);
text-align: center;
}
@@ -1198,7 +1198,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
}
.r-v2-ejs__cover-glow {
position: absolute;
inset: 12px;
inset: var(--r-space-3);
background: radial-gradient(
120% 120% at 50% 60%,
color-mix(in srgb, var(--r-color-brand-primary) 35%, transparent),
@@ -1219,7 +1219,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px 4px 0;
padding: var(--r-space-1) var(--r-space-1) 0;
}
.r-v2-ejs__title {
margin: 0;
@@ -1234,7 +1234,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
}
.r-v2-ejs__play {
margin-top: 4px;
margin-top: var(--r-space-1);
font-weight: var(--r-font-weight-semibold) !important;
letter-spacing: 0.02em;
box-shadow: 0 10px 24px
@@ -1273,7 +1273,7 @@ const saveSlot = computed(() => chosenSlot(slotChoice.value, customSlot.value));
display: flex;
flex-direction: column;
/* Between the preview section and the list section when stacked. */
gap: 20px;
gap: var(--r-space-5);
flex: 1;
min-height: 0;
}
@@ -1355,7 +1355,7 @@ html[data-bp~="md-and-up"]
.r-v2-ejs__slot {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-ejs__assets {
flex: 1;
@@ -1391,7 +1391,7 @@ html[data-bp~="md-and-up"]
padding: 14px;
display: flex;
flex-direction: column;
gap: 12px;
gap: var(--r-space-3);
flex: 1;
}
.r-v2-ejs__setup-note {
@@ -1410,8 +1410,8 @@ html[data-bp~="md-and-up"]
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
margin-top: 12px;
gap: var(--r-space-2);
margin-top: var(--r-space-3);
font-size: var(--r-font-size-xs);
color: var(--r-color-fg-faint);
font-style: italic;
@@ -1524,6 +1524,6 @@ html[data-bp~="sm-and-down"] .r-v2-ejs__hero-links {
flex: 1 1 100%;
flex-direction: row;
border-top: 1px solid var(--r-color-border);
padding-top: 4px;
padding-top: var(--r-space-1);
}
</style>

View File

@@ -422,7 +422,7 @@ onBeforeUnmount(releaseGame);
grid-template-rows: minmax(0, 1fr) auto;
justify-items: center;
align-items: center;
gap: 20px;
gap: var(--r-space-5);
overflow: hidden;
padding: var(--r-pico8-stage-pad);
box-sizing: border-box;
@@ -476,7 +476,7 @@ html[data-bp~="sm-and-down"] .r-v2-pico8__stage {
z-index: 2;
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
}
/* Clear the bottom tab bar, which overlays this corner on sm-and-down. */
@@ -496,7 +496,7 @@ html[data-bp~="sm-and-down"] .r-v2-pico8__actions {
display: flex;
align-items: center;
justify-content: center;
gap: 32px;
gap: var(--r-space-8);
touch-action: none;
user-select: none;
}
@@ -542,14 +542,14 @@ html[data-bp~="sm-and-down"] .r-v2-pico8__actions {
.r-v2-pico8__face-buttons {
display: flex;
align-items: center;
gap: 12px;
gap: var(--r-space-3);
}
.r-v2-pico8__brand {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
gap: var(--r-space-2);
color: var(--r-color-fg-faint);
font-size: var(--r-font-size-xs);
font-style: italic;
@@ -562,7 +562,7 @@ html[data-bp~="sm-and-down"] .r-v2-pico8__actions {
html[data-bp~="xs"] .r-v2-pico8__stage {
--r-pico8-stage-pad: 16px;
gap: 12px;
gap: var(--r-space-3);
}
html[data-bp~="xs"] .r-v2-pico8__screen {
@@ -570,7 +570,7 @@ html[data-bp~="xs"] .r-v2-pico8__screen {
}
html[data-bp~="xs"] .r-v2-pico8__controls {
gap: 16px;
gap: var(--r-space-4);
transform: scale(0.9);
}
</style>

View File

@@ -202,7 +202,7 @@ onBeforeUnmount(() => {
.r-v2-ruffle__section-label {
display: inline-flex;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
font-size: var(--r-font-size-sm);
text-transform: uppercase;
letter-spacing: 0.04em;
@@ -212,7 +212,7 @@ onBeforeUnmount(() => {
.r-v2-ruffle__color-row {
display: flex;
align-items: center;
gap: 12px;
gap: var(--r-space-3);
}
.r-v2-ruffle__color-input {
appearance: none;
@@ -243,7 +243,7 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
gap: var(--r-space-2);
font-size: var(--r-font-size-xs);
color: var(--r-color-fg-faint);
font-style: italic;

View File

@@ -1977,7 +1977,7 @@ onBeforeUnmount(() => {
.r-v2-stream {
position: relative;
min-height: calc(100vh - var(--r-nav-h));
padding: 32px var(--r-row-pad) 48px;
padding: var(--r-space-8) var(--r-row-pad) var(--r-space-12);
}
/* Pre-game layout: hero | resume | session over aside. Mirrors the
@@ -1992,7 +1992,7 @@ onBeforeUnmount(() => {
grid-template-areas:
"hero resume session"
"hero resume aside";
gap: 20px;
gap: var(--r-space-5);
max-width: 1280px;
margin: 0 auto;
align-items: stretch;
@@ -2015,7 +2015,7 @@ onBeforeUnmount(() => {
}
.r-v2-stream__panel-head--label {
justify-content: flex-start;
gap: 8px;
gap: var(--r-space-2);
align-items: center;
text-transform: uppercase;
letter-spacing: 0.06em;
@@ -2027,8 +2027,8 @@ onBeforeUnmount(() => {
/* ── Hero column ─────────────────────────────────────────── */
.r-v2-stream__hero {
grid-area: hero;
padding: 16px;
gap: 12px;
padding: var(--r-space-4);
gap: var(--r-space-3);
text-align: center;
}
@@ -2048,7 +2048,7 @@ onBeforeUnmount(() => {
}
.r-v2-stream__cover-glow {
position: absolute;
inset: 12px;
inset: var(--r-space-3);
background: radial-gradient(
120% 120% at 50% 60%,
color-mix(in srgb, var(--r-color-brand-primary) 35%, transparent),
@@ -2066,7 +2066,7 @@ onBeforeUnmount(() => {
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px 4px 0;
padding: var(--r-space-1) var(--r-space-1) 0;
}
.r-v2-stream__title {
margin: 0;
@@ -2081,7 +2081,7 @@ onBeforeUnmount(() => {
}
.r-v2-stream__play {
margin-top: 4px;
margin-top: var(--r-space-1);
font-weight: var(--r-font-weight-semibold) !important;
letter-spacing: 0.02em;
white-space: normal;
@@ -2113,7 +2113,7 @@ onBeforeUnmount(() => {
grid-area: aside;
display: flex;
flex-direction: column;
gap: 20px;
gap: var(--r-space-5);
min-width: 0;
}
@@ -2138,7 +2138,7 @@ onBeforeUnmount(() => {
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--r-color-fg-secondary);
margin-top: 4px;
margin-top: var(--r-space-1);
}
.r-v2-stream__strip-views {
margin-left: auto;
@@ -2191,7 +2191,7 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
padding: 10px var(--r-space-3);
font-size: var(--r-font-size-sm);
color: var(--r-color-fg-secondary);
}
@@ -2212,13 +2212,13 @@ onBeforeUnmount(() => {
padding: 14px;
display: flex;
flex-direction: column;
gap: 12px;
gap: var(--r-space-3);
flex: 1;
}
.r-v2-stream__setup-item {
display: flex;
flex-direction: column;
gap: 4px;
gap: var(--r-space-1);
}
.r-v2-stream__setup-hint {
font-size: var(--r-font-size-xs);
@@ -2265,8 +2265,8 @@ onBeforeUnmount(() => {
line-height: 1.5;
}
.r-v2-stream__ended-reason {
margin-top: 12px;
padding: 10px 12px;
margin-top: var(--r-space-3);
padding: 10px var(--r-space-3);
border-radius: var(--r-radius-md);
border-left: 3px solid var(--r-color-warning);
background: var(--r-color-surface);
@@ -2279,7 +2279,7 @@ onBeforeUnmount(() => {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px;
gap: var(--r-space-2);
width: 100%;
}
@@ -2340,7 +2340,7 @@ html[data-bp~="sm-and-down"] .r-v2-stream__hero-links {
flex: 1 1 100%;
flex-direction: row;
border-top: 1px solid var(--r-color-border);
padding-top: 4px;
padding-top: var(--r-space-1);
}
html[data-bp~="sm-and-down"] .r-v2-stream__bar-title,
html[data-bp~="sm-and-down"] .r-v2-stream__bar-platform {

View File

@@ -838,7 +838,7 @@ function stopScan() {
display: flex;
flex-direction: column;
gap: 18px;
padding: 16px 18px 18px;
padding: var(--r-space-4) 18px 18px;
background: var(--r-color-bg-elevated);
border: 1px solid var(--r-color-border);
border-radius: var(--r-radius-lg);
@@ -856,7 +856,7 @@ function stopScan() {
justify-content: flex-end;
align-items: center;
min-height: 0;
margin-bottom: -8px;
margin-bottom: calc(-1 * var(--r-space-2));
}
.r-v2-scan-card__fields {
@@ -912,7 +912,7 @@ function stopScan() {
.r-v2-scan-card__cta {
align-items: stretch;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-scan-card__start {
width: 100%;
@@ -956,10 +956,10 @@ function stopScan() {
.r-v2-scan-card__providers-group {
display: flex;
flex-direction: column;
gap: 4px;
gap: var(--r-space-1);
}
.r-v2-scan-card__providers-group + .r-v2-scan-card__providers-group {
margin-top: 8px;
margin-top: var(--r-space-2);
}
.r-v2-scan-card__providers-group-label {
font-size: 10px;
@@ -991,7 +991,7 @@ function stopScan() {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
padding: var(--r-space-1) var(--r-space-2);
border-radius: var(--r-radius-pill);
background: var(--r-color-surface);
border: 1px solid var(--r-color-border);
@@ -1053,7 +1053,7 @@ function stopScan() {
grid-template-columns: auto 1fr auto;
align-items: center;
column-gap: 14px;
padding: 12px 16px;
padding: var(--r-space-3) var(--r-space-4);
border-bottom: 1px solid var(--r-color-border);
flex-shrink: 0;
min-height: 56px;
@@ -1062,7 +1062,7 @@ function stopScan() {
.r-v2-scan-live__status {
display: inline-flex;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
font-size: 13px;
font-weight: var(--r-font-weight-semibold);
color: var(--r-color-brand-primary);
@@ -1113,8 +1113,8 @@ function stopScan() {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
padding: 4px 10px;
gap: var(--r-space-1);
padding: var(--r-space-1) 10px;
border-radius: var(--r-radius-pill);
background: color-mix(in srgb, var(--r-color-brand-primary) 18%, transparent);
color: var(--r-color-brand-primary);
@@ -1159,7 +1159,7 @@ function stopScan() {
min-height: 0;
overflow-y: auto;
scroll-behavior: smooth;
padding: 12px;
padding: var(--r-space-3);
}
/* Empty state — calm, centred, brand-orbed icon. The orb provides the
@@ -1169,8 +1169,8 @@ function stopScan() {
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 56px 24px 64px;
gap: var(--r-space-3);
padding: var(--r-space-14) var(--r-space-6) 64px;
color: var(--r-color-fg-muted);
text-align: center;
min-height: 280px;
@@ -1188,7 +1188,7 @@ function stopScan() {
transparent 100%
);
color: var(--r-color-brand-primary);
margin-bottom: 4px;
margin-bottom: var(--r-space-1);
}
.r-v2-scan-live__empty-title {
margin: 0;
@@ -1206,7 +1206,7 @@ function stopScan() {
.r-v2-scan-live__panels {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-scan-live__panel {
background: transparent;

View File

@@ -295,7 +295,7 @@ onMounted(() => {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
gap: var(--r-space-1);
min-width: 0;
}
@@ -315,7 +315,7 @@ onMounted(() => {
.r-v2-tok__actions {
display: inline-flex;
align-items: center;
gap: 4px;
gap: var(--r-space-1);
}
/* Dimmed at rest, full red on hover. RBtn's text variant uses

View File

@@ -211,7 +211,7 @@ onMounted(() => {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
padding: 16px;
padding: var(--r-space-4);
}
html[data-bp~="sm-and-down"] .r-v2-meta__grid {
grid-template-columns: repeat(2, minmax(0, 1fr));

View File

@@ -611,7 +611,7 @@ onBeforeUnmount(() =>
.r-v2-scan-settings__desc {
margin: 0;
padding: 16px 16px 0;
padding: var(--r-space-4) var(--r-space-4) 0;
color: var(--r-color-fg-muted);
font-size: 13px;
line-height: 1.5;
@@ -623,10 +623,10 @@ onBeforeUnmount(() =>
}
.r-v2-scan-settings__field {
padding: 16px;
padding: var(--r-space-4);
display: flex;
flex-direction: column;
gap: 12px;
gap: var(--r-space-3);
}
.r-v2-scan-settings__field--bordered {
border-top: 1px solid var(--r-color-border);
@@ -653,9 +653,9 @@ html[data-bp~="xs"] .r-v2-scan-settings__toggle-grid {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-top: 8px;
padding: 12px 16px;
gap: var(--r-space-4);
margin-top: var(--r-space-2);
padding: var(--r-space-3) var(--r-space-4);
border-radius: 12px;
background: var(--r-color-panel);
border: 1px solid var(--r-color-panel-border);
@@ -669,7 +669,7 @@ html[data-bp~="xs"] .r-v2-scan-settings__toggle-grid {
.r-v2-scan-settings__bar-actions {
display: flex;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-scan-settings__bar-enter-active,

View File

@@ -586,10 +586,10 @@ function onVirtualCollectionTypeChange(value: unknown) {
<style scoped>
/* Generic field row inside a section body. */
.r-v2-ui__field {
padding: 16px;
padding: var(--r-space-4);
display: flex;
flex-direction: column;
gap: 12px;
gap: var(--r-space-3);
}
.r-v2-ui__field--bordered {
border-top: 1px solid var(--r-color-border);
@@ -632,14 +632,14 @@ html[data-bp~="xs"] .r-v2-ui__toggle-grid {
.r-v2-ui__theme-row {
display: flex;
gap: 10px;
padding: 16px;
padding: var(--r-space-4);
}
.r-v2-ui__theme-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
gap: var(--r-space-2);
padding: 10px;
border-radius: 8px;
border: 1px solid var(--r-color-border);
@@ -674,7 +674,7 @@ html[data-bp~="xs"] .r-v2-ui__theme-row {
.r-v2-ui__version-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
gap: var(--r-space-3);
}
.r-v2-ui__version-card {
@@ -682,7 +682,7 @@ html[data-bp~="xs"] .r-v2-ui__theme-row {
display: flex;
align-items: center;
gap: 14px;
padding: 16px 18px;
padding: var(--r-space-4) 18px;
background: var(--r-color-surface);
border: 1px solid var(--r-color-border);
border-radius: 10px;
@@ -729,7 +729,7 @@ html[data-bp~="xs"] .r-v2-ui__theme-row {
.r-v2-ui__version-titles {
display: flex;
align-items: center;
gap: 8px;
gap: var(--r-space-2);
}
.r-v2-ui__version-title {
font-size: 14px;

View File

@@ -347,8 +347,8 @@ onUnmounted(() => {
.r-v2-profile__identity-row {
display: flex;
align-items: center;
gap: 24px;
margin-bottom: 28px;
gap: var(--r-space-6);
margin-bottom: var(--r-space-7);
}
.r-v2-profile__avatar {
@@ -407,7 +407,7 @@ onUnmounted(() => {
.r-v2-profile__identity {
display: flex;
flex-direction: column;
gap: 8px;
gap: var(--r-space-2);
min-width: 0;
}
@@ -442,7 +442,7 @@ onUnmounted(() => {
.r-v2-profile__meta {
display: flex;
flex-direction: column;
gap: 4px;
gap: var(--r-space-1);
font-size: 12px;
color: var(--r-color-fg-muted);
}
@@ -454,7 +454,7 @@ onUnmounted(() => {
/* Field rows — hairline-divided, padding mirrors the mock. */
.r-v2-profile__field {
padding: 14px 16px;
padding: 14px var(--r-space-4);
border-bottom: 1px solid var(--r-color-border);
}
.r-v2-profile__field:last-of-type {
@@ -464,14 +464,14 @@ onUnmounted(() => {
/* Change-password button lives inside the password field's append-inner
area — keep it compact so it doesn't blow out the row height. */
.r-v2-profile__pwd-btn {
margin-right: 4px;
margin-right: var(--r-space-1);
}
.r-v2-profile__actions {
display: flex;
justify-content: flex-start;
gap: 8px;
padding: 14px 16px;
gap: var(--r-space-2);
padding: 14px var(--r-space-4);
border-top: 1px solid var(--r-color-border);
}
</style>

View File

@@ -346,7 +346,7 @@ html[data-bp~="sm-and-down"] .r-v2-upload__list {
grid-template-columns: auto 1fr auto auto;
gap: 10px;
align-items: center;
padding: 8px 12px;
padding: var(--r-space-2) var(--r-space-3);
font-size: 13px;
color: var(--r-color-fg);
border-bottom: 1px solid var(--r-color-border);