Krolyxon
Commit ce0f374

ferreniumassetscsscomponents.css

450 lines · 8.1 KB · CSS

1/* Components: labels, display type, top bar, theme switch, page patterns. */
2
3/* ---- Type roles ------------------------------------------------------- */
4
5.label {
6 font-family: var(--font-mono);
7 font-size: var(--label);
8 font-weight: 400;
9 line-height: 1.2;
10 letter-spacing: 0.08em;
11 text-transform: uppercase;
12 color: var(--text-secondary);
13}
14
15.dim {
16 color: var(--text-disabled);
17}
18
19.doto {
20 font-family: var(--font-display);
21 font-weight: 600;
22 color: var(--text-display);
23}
24
25.display-xl {
26 font-size: var(--display-xl);
27 line-height: 1;
28 letter-spacing: -0.03em;
29}
30
31.display-lg {
32 font-size: var(--display-lg);
33 line-height: 1.05;
34 letter-spacing: -0.02em;
35}
36
37.display-md {
38 font-size: var(--display-md);
39 line-height: 1.1;
40 letter-spacing: -0.02em;
41}
42
43/* Inline status text: [LOADING], [COPIED], [ERROR: …]. */
44.status {
45 font-family: var(--font-mono);
46 font-size: var(--caption);
47 font-weight: 400;
48 line-height: 1.4;
49 letter-spacing: 0.04em;
50 text-transform: uppercase;
51 color: var(--text-secondary);
52}
53
54.status-error {
55 color: var(--error);
56}
57
58/* ---- Buttons ---------------------------------------------------------- */
59
60.btn-ghost {
61 display: inline-flex;
62 align-items: center;
63 min-height: 44px;
64 font-family: var(--font-mono);
65 font-size: 13px;
66 letter-spacing: 0.06em;
67 text-transform: uppercase;
68 color: var(--text-secondary);
69 background: none;
70 border: 0;
71 transition: color var(--dur-micro) var(--ease);
72}
73
74.btn-ghost:hover {
75 color: var(--text-display);
76 text-decoration: none;
77}
78
79/* ---- Top bar ---------------------------------------------------------- */
80
81.topbar {
82 display: flex;
83 align-items: center;
84 justify-content: space-between;
85 gap: var(--space-md);
86 min-height: 64px;
87 padding-block: var(--space-md);
88}
89
90.topbar-home {
91 display: flex;
92 align-items: center;
93 gap: var(--space-sm);
94 min-width: 0;
95 color: var(--text-display);
96}
97
98.topbar-home .label {
99 color: inherit;
100 white-space: nowrap;
101 overflow: hidden;
102 text-overflow: ellipsis;
103}
104
105/* `site.logo`: sized by height so any aspect ratio fits the bar. */
106.topbar-logo {
107 flex: none;
108 height: 28px;
109 width: auto;
110 max-width: 160px;
111 object-fit: contain;
112}
113
114.topbar-home:hover {
115 text-decoration: none;
116}
117
118/* ---- Segmented control ------------------------------------------------ */
119
120.segmented {
121 display: inline-flex;
122 flex: none;
123 padding: var(--space-2xs);
124 border: 1px solid var(--border-visible);
125 border-radius: 999px;
126}
127
128.segmented button,
129.segmented a {
130 display: inline-flex;
131 align-items: center;
132 height: 30px;
133 padding: 0 var(--space-md);
134 border: 0;
135 border-radius: 999px;
136 background: transparent;
137 font-family: var(--font-mono);
138 font-size: var(--label);
139 letter-spacing: 0.08em;
140 text-transform: uppercase;
141 color: var(--text-secondary);
142 transition:
143 background-color 200ms var(--ease),
144 color 200ms var(--ease);
145}
146
147.segmented button:hover,
148.segmented a:hover {
149 color: var(--text-primary);
150 text-decoration: none;
151}
152
153.segmented button[aria-pressed="true"],
154.segmented a[aria-current="true"] {
155 background: var(--text-display);
156 color: var(--black);
157}
158
159.segmented-sm button,
160.segmented-sm a {
161 height: 26px;
162 padding: 0 var(--space-sm);
163}
164
165@media (pointer: coarse) {
166 .segmented button,
167 .segmented a {
168 height: 40px;
169 }
170}
171
172/* The theme switch needs JS; without it the OS preference applies. */
173html:not(.js) .theme-switch {
174 display: none;
175}
176
177/* ---- Site header / footer --------------------------------------------- */
178
179.site-header {
180 padding-block: var(--space-sm);
181}
182
183.footer {
184 display: flex;
185 flex-wrap: wrap;
186 align-items: flex-end;
187 justify-content: space-between;
188 gap: var(--space-md);
189 margin-top: var(--space-4xl);
190 padding-block: var(--space-xl);
191}
192
193.site-footer {
194 font-size: var(--body-sm);
195 color: var(--text-secondary);
196}
197
198/* ---- Index ------------------------------------------------------------ */
199
200.hero {
201 display: flex;
202 flex-wrap: wrap;
203 align-items: flex-end;
204 justify-content: space-between;
205 gap: var(--space-md) var(--space-xl);
206 padding-top: var(--space-3xl);
207}
208
209.hero-main {
210 min-width: 0;
211}
212
213.hero h1 {
214 overflow-wrap: anywhere;
215}
216
217.hero-desc {
218 margin-top: var(--space-sm);
219 max-width: 60ch;
220 color: var(--text-secondary);
221}
222
223.hero-meta {
224 white-space: nowrap;
225 padding-bottom: var(--space-xs);
226}
227
228/* ---- Inputs ----------------------------------------------------------- */
229
230.field {
231 display: flex;
232 flex-direction: column;
233 gap: var(--space-sm);
234}
235
236.field input {
237 width: 100%;
238 min-height: 44px;
239 padding: var(--space-sm) 0;
240 border: 0;
241 border-bottom: 1px solid var(--border-visible);
242 border-radius: 0;
243 background: transparent;
244 font-family: var(--font-mono);
245 font-size: var(--body);
246 color: var(--text-primary);
247 outline: none;
248 transition: border-color var(--dur-micro) var(--ease);
249 -webkit-appearance: none;
250 appearance: none;
251}
252
253.field input::placeholder {
254 color: var(--text-disabled);
255}
256
257.field input:focus {
258 border-bottom-color: var(--text-primary);
259}
260
261.field input::-webkit-search-cancel-button {
262 display: none;
263}
264
265/* ---- Index: filter, sort, repository rows ----------------------------- */
266
267.index-tools {
268 display: flex;
269 flex-wrap: wrap;
270 align-items: flex-end;
271 justify-content: space-between;
272 gap: var(--space-md) var(--space-xl);
273 margin-top: var(--space-2xl);
274}
275
276.index-tools .field {
277 flex: 1 1 240px;
278 max-width: 360px;
279}
280
281/* Bracket nav: [ ACTIVE ] INACTIVE */
282.sort,
283.bracket-nav {
284 display: flex;
285 gap: var(--space-sm);
286}
287
288.sort a,
289.bracket-nav a {
290 display: inline-flex;
291 align-items: center;
292 min-height: 44px;
293 padding-inline: var(--space-xs);
294 color: var(--text-disabled);
295 transition: color var(--dur-micro) var(--ease);
296}
297
298.sort a:hover,
299.bracket-nav a:hover {
300 color: var(--text-secondary);
301 text-decoration: none;
302}
303
304.sort a.active,
305.bracket-nav a.active {
306 color: var(--text-display);
307}
308
309.sort a.active::before,
310.bracket-nav a.active::before {
311 content: "[ ";
312 white-space: pre;
313}
314
315.sort a.active::after,
316.bracket-nav a.active::after {
317 content: " ]";
318 white-space: pre;
319}
320
321.repo-section {
322 margin-top: var(--space-2xl);
323}
324
325.section-label {
326 padding-bottom: var(--space-sm);
327}
328
329.repo-list {
330 list-style: none;
331 border-top: 1px solid var(--border);
332}
333
334.repo-row {
335 display: flex;
336 align-items: baseline;
337 justify-content: space-between;
338 gap: var(--space-md);
339 border-bottom: 1px solid var(--border);
340}
341
342.repo-link {
343 display: flex;
344 flex-direction: column;
345 gap: var(--space-2xs);
346 flex: 1;
347 min-width: 0;
348 padding-block: 14px;
349 color: var(--text-primary);
350}
351
352.repo-link:hover {
353 text-decoration: none;
354}
355
356.repo-name {
357 font-weight: 500;
358 color: var(--text-display);
359 overflow-wrap: anywhere;
360}
361
362.repo-link:hover .repo-name {
363 text-decoration: underline;
364 text-underline-offset: 3px;
365 text-decoration-thickness: 1px;
366}
367
368.repo-desc {
369 color: var(--text-secondary);
370}
371
372@media (min-width: 768px) {
373 .repo-link {
374 flex-direction: row;
375 align-items: baseline;
376 gap: var(--space-md);
377 }
378
379 .repo-name {
380 flex: none;
381 max-width: 50%;
382 }
383
384 .repo-desc {
385 overflow: hidden;
386 white-space: nowrap;
387 text-overflow: ellipsis;
388 }
389}
390
391.repo-meta {
392 display: inline-flex;
393 align-items: center;
394 gap: var(--space-sm);
395 flex: none;
396 color: var(--text-disabled);
397 white-space: nowrap;
398}
399
400.repo-lang {
401 color: var(--text-secondary);
402}
403
404.repo-lang::after {
405 content: "\00B7";
406 margin-left: var(--space-sm);
407 color: var(--text-disabled);
408}
409
410/* Data-status dot: pushed in the last 24 hours. */
411.dot {
412 width: 6px;
413 height: 6px;
414 border-radius: 50%;
415 background: var(--accent);
416}
417
418.no-matches {
419 padding-block: var(--space-2xl);
420}
421
422/* ---- Empty state ------------------------------------------------------ */
423
424.empty {
425 padding-block: var(--space-4xl);
426 text-align: center;
427}
428
429.empty-title {
430 color: var(--text-secondary);
431}
432
433.empty-desc {
434 margin-top: var(--space-xs);
435 color: var(--text-disabled);
436}
437
438/* ---- Error page ------------------------------------------------------- */
439
440.error-page {
441 display: flex;
442 flex-direction: column;
443 align-items: flex-start;
444 gap: var(--space-md);
445 padding-top: var(--space-4xl);
446}
447
448.error-page .btn-ghost {
449 margin-top: var(--space-xl);
450}