Skip to content

Commit 1869988

Browse files
committed
refactor(css): align shared tokens and app styles with stylelint
1 parent d0d2e7b commit 1869988

2 files changed

Lines changed: 105 additions & 90 deletions

File tree

frontend/src/styles/main.css

Lines changed: 59 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
opacity: 0.34;
6969
}
7070

71+
.dominant-field {
72+
position: relative;
73+
align-items: center;
74+
}
75+
7176
.form-shell--minimal .dominant-field {
7277
width: min(100%, 52rem);
7378
margin: 0 auto;
@@ -78,21 +83,16 @@
7883
}
7984

8085
.result-shell .dominant-field {
81-
--input-lg-min-height: 3.85rem;
82-
--input-lg-padding-inline: 1.35rem 5.2rem;
86+
--input-lg-min-height: 4rem;
87+
--input-lg-padding-inline: 1.25rem 5rem;
8388
--input-lg-font-size: clamp(1rem, 1.8vw, 1.22rem);
8489
--input-lg-letter-spacing: -0.01em;
85-
--dominant-field-action-top: 0.48rem;
86-
--dominant-field-action-right: 0.48rem;
87-
--dominant-field-action-text-min-width: 4.2rem;
88-
--dominant-field-action-text-padding-inline: 0.8rem;
89-
--dominant-field-action-soft-bg: rgba(255, 255, 255, 0.045);
90-
--dominant-field-action-soft-hover-bg: rgba(255, 255, 255, 0.08);
91-
}
92-
93-
.dominant-field {
94-
position: relative;
95-
align-items: center;
90+
--dominant-field-action-top: 0.5rem;
91+
--dominant-field-action-right: 0.5rem;
92+
--dominant-field-action-text-min-width: 4rem;
93+
--dominant-field-action-text-padding-inline: var(--space-3);
94+
--dominant-field-action-soft-bg: var(--surface-base);
95+
--dominant-field-action-soft-hover-bg: var(--border-subtle);
9696
}
9797

9898
.field-block {
@@ -130,7 +130,7 @@
130130
padding: 0;
131131
margin: -1px;
132132
overflow: hidden;
133-
clip: rect(0 0 0 0);
133+
clip-path: inset(50%);
134134
white-space: nowrap;
135135
border: 0;
136136
}
@@ -155,7 +155,7 @@
155155

156156
.input {
157157
width: 100%;
158-
padding: 0.95rem 1.1rem;
158+
padding: var(--space-4);
159159
border: var(--border-width) solid var(--border-muted);
160160
border-radius: 999px;
161161
background: var(--surface-elevated);
@@ -172,9 +172,6 @@
172172
}
173173

174174
.input:focus-visible,
175-
.btn:focus-visible,
176-
.utility-link:focus-visible,
177-
.utility-button:focus-visible,
178175
a:focus-visible {
179176
outline: none;
180177
box-shadow: var(--focus-ring);
@@ -187,7 +184,7 @@ a:focus-visible {
187184

188185
.input--lg {
189186
min-height: var(--input-lg-min-height, 4.5rem);
190-
padding-inline: var(--input-lg-padding-inline, 1.35rem 4.9rem);
187+
padding-inline: var(--input-lg-padding-inline, 1.25rem 5rem);
191188
font-size: var(--input-lg-font-size, clamp(1.05rem, 2.3vw, 1.5rem));
192189
letter-spacing: var(--input-lg-letter-spacing, -0.03em);
193190
}
@@ -199,7 +196,7 @@ a:focus-visible {
199196
border-color: transparent;
200197
color: var(--text-muted);
201198
text-align: center;
202-
font-size: 0.98rem;
199+
font-size: var(--font-size-0);
203200
font-weight: 500;
204201
padding: 0;
205202
}
@@ -219,7 +216,7 @@ a:focus-visible {
219216
justify-content: center;
220217
border: 0;
221218
border-radius: 999px;
222-
background: var(--dominant-field-action-bg, rgba(255, 255, 255, 0.06));
219+
background: var(--dominant-field-action-bg, var(--surface-elevated));
223220
color: var(--text-strong);
224221
cursor: pointer;
225222
transition:
@@ -231,28 +228,18 @@ a:focus-visible {
231228

232229
.dominant-field__action--text {
233230
width: auto;
234-
min-width: var(--dominant-field-action-text-min-width, 4.4rem);
235-
padding: 0 var(--dominant-field-action-text-padding-inline, 0.9rem);
231+
min-width: var(--dominant-field-action-text-min-width, 4rem);
232+
padding: 0 var(--dominant-field-action-text-padding-inline, var(--space-3));
236233
font-size: var(--font-size-00);
237234
letter-spacing: 0.04em;
238235
text-transform: uppercase;
239236
}
240237

241238
.dominant-field__action--soft {
242-
background: var(--dominant-field-action-soft-bg, rgba(255, 255, 255, 0.045));
239+
background: var(--dominant-field-action-soft-bg, var(--surface-base));
243240
color: var(--text-muted);
244241
}
245242

246-
.dominant-field__action:hover:not(:disabled) {
247-
transform: translateX(0.04rem);
248-
background: rgba(255, 255, 255, 0.11);
249-
}
250-
251-
.dominant-field__action--soft:hover:not(:disabled) {
252-
background: var(--dominant-field-action-soft-hover-bg, rgba(255, 255, 255, 0.08));
253-
color: var(--text-strong);
254-
}
255-
256243
.dominant-field__action:disabled {
257244
opacity: 0.5;
258245
cursor: not-allowed;
@@ -263,6 +250,16 @@ a:focus-visible {
263250
box-shadow: var(--focus-ring);
264251
}
265252

253+
.dominant-field__action:hover:not(:disabled) {
254+
transform: translateX(0.04rem);
255+
background: var(--border-subtle);
256+
}
257+
258+
.dominant-field__action--soft:hover:not(:disabled) {
259+
background: var(--dominant-field-action-soft-hover-bg, var(--border-subtle));
260+
color: var(--text-strong);
261+
}
262+
266263
.notice {
267264
display: grid;
268265
gap: var(--space-2);
@@ -309,7 +306,7 @@ a:focus-visible {
309306
.featured-feed-item:hover,
310307
.featured-feed-item:focus-within {
311308
border-color: var(--border-strong);
312-
background: rgba(255, 255, 255, 0.065);
309+
background: var(--border-subtle);
313310
}
314311

315312
.featured-feed-item__link:hover,
@@ -330,12 +327,12 @@ a:focus-visible {
330327
}
331328

332329
.notice[data-tone="error"] {
333-
border-color: rgba(248, 113, 113, 0.22);
330+
border-color: var(--border-danger);
334331
background: var(--bg-danger);
335332
}
336333

337334
.notice[data-tone="success"] {
338-
border-color: rgba(110, 231, 183, 0.22);
335+
border-color: var(--border-success);
339336
background: var(--bg-success);
340337
}
341338

@@ -387,13 +384,13 @@ a:focus-visible {
387384
}
388385

389386
.token-gate__actions .btn {
390-
min-height: 2.55rem;
391-
padding-inline: 0.95rem;
387+
min-height: 2.5rem;
388+
padding-inline: var(--space-4);
392389
border-color: var(--border-subtle);
393-
background: rgba(255, 255, 255, 0.025);
390+
background: var(--surface-base);
394391
color: var(--text-body);
395-
font-size: 0.98rem;
396-
font-weight: 550;
392+
font-size: var(--font-size-0);
393+
font-weight: 600;
397394
}
398395

399396
.token-gate__back {
@@ -410,7 +407,7 @@ a:focus-visible {
410407

411408
.token-gate__nudge-link {
412409
text-decoration: none;
413-
color: rgba(255, 255, 255, 0.72);
410+
color: var(--eyebrow-color);
414411
}
415412

416413
.token-gate__nudge-link:hover,
@@ -426,27 +423,27 @@ a:focus-visible {
426423

427424
.field-block--stretch .input {
428425
min-height: 3.5rem;
429-
padding-inline: 1.1rem;
426+
padding-inline: var(--space-4);
430427
border-color: var(--border-muted);
431428
background: var(--surface-elevated);
432429
}
433430

434431
.field-block--stretch .input::placeholder {
435-
color: rgba(255, 255, 255, 0.28);
432+
color: var(--text-faint);
436433
}
437434

438435
.field-block--stretch .field-error {
439436
text-align: left;
440437
}
441438

442439
.result-hero__reader {
443-
border-color: rgba(255, 147, 0, 0.24);
444-
background: rgba(255, 147, 0, 0.12);
440+
border-color: var(--border-reader);
441+
background: var(--surface-reader);
445442
}
446443

447444
.result-meta {
448445
margin: 0;
449-
font-size: clamp(0.98rem, 1.5vw, 1.16rem);
446+
font-size: clamp(var(--font-size-0), 1.5vw, var(--font-size-2));
450447
line-height: 1.18;
451448
color: var(--text-strong);
452449
text-align: left;
@@ -488,7 +485,7 @@ a:focus-visible {
488485

489486
.preview-card__date {
490487
margin: 0;
491-
color: rgba(255, 255, 255, 0.62);
488+
color: var(--text-muted);
492489
font-size: var(--font-size-00);
493490
letter-spacing: 0.05em;
494491
text-transform: uppercase;
@@ -505,7 +502,7 @@ a:focus-visible {
505502
}
506503

507504
.preview-card__actions a {
508-
color: rgba(255, 255, 255, 0.72);
505+
color: var(--eyebrow-color);
509506
font-size: var(--font-size-00);
510507
font-weight: 600;
511508
letter-spacing: 0.06em;
@@ -527,8 +524,8 @@ a:focus-visible {
527524
}
528525

529526
.btn--linkish {
530-
color: rgba(255, 255, 255, 0.78);
531-
font-weight: 560;
527+
color: var(--eyebrow-color);
528+
font-weight: 600;
532529
}
533530

534531
.notice[data-state="loading"] p {
@@ -543,7 +540,7 @@ a:focus-visible {
543540
.notice__spinner {
544541
width: 1rem;
545542
height: 1rem;
546-
border: var(--border-width) solid rgba(255, 255, 255, 0.16);
543+
border: var(--border-width) solid var(--border-muted);
547544
border-top-color: var(--accent);
548545
border-radius: 999px;
549546
animation: spin 0.9s linear infinite;
@@ -568,6 +565,13 @@ a:focus-visible {
568565
cursor: pointer;
569566
}
570567

568+
.utility-link:focus-visible,
569+
.utility-button:focus-visible {
570+
outline: none;
571+
box-shadow: var(--focus-ring);
572+
border-color: var(--border-strong);
573+
}
574+
571575
.utility-link:hover,
572576
.utility-button:hover {
573577
color: var(--text-strong);
@@ -578,7 +582,7 @@ a:focus-visible {
578582
text-transform: uppercase;
579583
}
580584

581-
@media (min-width: 48rem) {
585+
@media (width >= 48rem) {
582586
.page-main {
583587
padding-top: clamp(1rem, 6vh, 4rem);
584588
}
@@ -589,7 +593,7 @@ a:focus-visible {
589593
}
590594
}
591595

592-
@media (max-width: 47.9375rem) {
596+
@media (width < 48rem) {
593597
.workspace-shell {
594598
gap: var(--space-4);
595599
}

0 commit comments

Comments
 (0)