forge
ExploreLog in

Tahinli/forge

public
0 watching
★ 0
13.2 KiB
1// repo: sage redesign. Repo home header, browse bar with the Clone popover, directory table,
2// README card, commit list and the repo-meta aside. Colours come from tokens only so both themes
3// follow main.scss.
4
5// Header: name with the visibility pill on the left, outline actions on the right.
6.page-head {
7 align-items: flex-start;
8 gap: 16px 24px;
9 margin-bottom: 12px;
10}
11
12// Title and visibility pill share one row, the pill vertically centred after the name.
13.repo-title-row {
14 display: flex;
15 flex-wrap: wrap;
16 align-items: center;
17 gap: 10px;
18
19 .badge {
20 padding: 0 9px;
21 font-size: 12px;
22 font-weight: 500;
23 line-height: 20px;
24 white-space: nowrap;
25 color: var(--muted);
26 background: transparent;
27 border: 1px solid var(--border-strong);
28 border-radius: 999px;
29 }
30}
31
32.repo-title {
33 margin: 0;
34 font-size: 22px;
35 font-weight: 600;
36 line-height: 1.3;
37 color: var(--text);
38}
39
40// Visually hidden but still read by screen readers (labels for the watch select, icon labels).
41.sr-only {
42 position: absolute;
43 width: 1px;
44 height: 1px;
45 padding: 0;
46 margin: -1px;
47 overflow: hidden;
48 clip: rect(0, 0, 0, 0);
49 white-space: nowrap;
50 border: 0;
51}
52
53.header-actions {
54 gap: 8px;
55 align-items: center;
56
57 // Small outline controls: Fork, Star, and the Watch level select with its Save button.
58 .fork-button,
59 .star-button {
60 display: inline-flex;
61 align-items: center;
62 gap: 6px;
63 height: 28px;
64 padding: 0 10px;
65 font: inherit;
66 font-size: 13px;
67 font-weight: 500;
68 line-height: 1;
69 white-space: nowrap;
70 color: var(--text);
71 background: var(--surface);
72 border: 1px solid var(--border-strong);
73 border-radius: var(--radius);
74 cursor: pointer;
75
76 &:hover {
77 background: var(--surface-2);
78 }
79
80 &:focus-visible {
81 outline: 2px solid var(--focus);
82 outline-offset: 2px;
83 }
84 }
85
86 .fork-form,
87 .star-form,
88 .watch-form {
89 display: inline-flex;
90 align-items: center;
91 gap: 6px;
92 margin: 0;
93 }
94
95 .watch-label {
96 display: inline-flex;
97 }
98
99 .watch-form select {
100 height: 28px;
101 padding: 0 26px 0 8px;
102 font-size: 13px;
103 color: var(--text);
104 background: var(--surface);
105 border: 1px solid var(--border-strong);
106 border-radius: var(--radius);
107 }
108
109 .watch-form .button {
110 height: 28px;
111 padding: 0 10px;
112 font-size: 13px;
113 }
114
115 .watch-form .muted,
116 .star-control .muted,
117 > .muted {
118 font-size: 13px;
119 white-space: nowrap;
120 }
121}
122
123.lead {
124 margin: 0 0 16px;
125 max-width: 70ch;
126 font-size: 15px;
127 line-height: 1.5;
128 color: var(--text-2);
129}
130
131.repo-search {
132 margin: 0 0 16px;
133
134 input {
135 height: 34px;
136 max-width: 360px;
137 font-size: 14px;
138 }
139}
140
141// Browse bar: branch, archive links and the Clone popover, framed by hairlines.
142.browse-bar {
143 margin: 20px 0 0;
144 padding: 12px 0;
145 font-size: 14px;
146 border-top: 1px solid var(--border);
147 border-bottom: 1px solid var(--border);
148
149 code {
150 padding: 3px 10px;
151 font-family: var(--mono);
152 font-size: 13.5px;
153 color: var(--text);
154 background: var(--surface);
155 border: 1px solid var(--border-strong);
156 border-radius: 999px;
157 }
158}
159
160.archive-links {
161 font-size: 14px;
162 color: var(--text-2);
163}
164
165// Clone popover. The panel sits under the button from 820px; below that it takes its own row.
166.clone {
167 position: relative;
168 margin-left: 0;
169
170 // The summary is a primary button (class "button primary"); no disclosure marker.
171 > summary {
172 display: inline-flex;
173 align-items: center;
174 gap: 8px;
175 height: 32px;
176 list-style: none;
177 cursor: pointer;
178
179 &::-webkit-details-marker {
180 display: none;
181 }
182
183 &::marker {
184 content: "";
185 }
186
187 svg {
188 flex: none;
189 width: 15px;
190 height: 15px;
191 fill: none;
192 stroke: currentColor;
193 stroke-width: 2;
194 stroke-linecap: round;
195 stroke-linejoin: round;
196 }
197
198 &:focus-visible {
199 outline: 2px solid var(--focus);
200 outline-offset: 2px;
201 }
202 }
203
204 .pop-panel {
205 width: 100%;
206 margin-top: 8px;
207 padding: 18px;
208 background: var(--surface);
209 border: 1px solid var(--border);
210 border-radius: var(--radius);
211 box-shadow: var(--shadow);
212 }
213
214 label {
215 display: block;
216 margin: 14px 0 6px;
217 font-size: 12.5px;
218 color: var(--muted);
219 }
220
221 label:first-child {
222 margin-top: 0;
223 }
224
225 input {
226 width: 100%;
227 height: 38px;
228 padding: 0 12px;
229 font-family: var(--mono);
230 font-size: 13px;
231 color: var(--text);
232 background: var(--surface-2);
233 border: 1px solid var(--border);
234 border-radius: var(--radius);
235
236 &:focus-visible {
237 outline: 2px solid var(--focus);
238 outline-offset: 1px;
239 }
240 }
241
242 .small {
243 margin: 12px 0 0;
244 }
245}
246
247@media (max-width: 819px) {
248 .clone {
249 order: 1;
250 flex: 1 1 100%;
251 }
252}
253
254@media (min-width: 820px) {
255 .clone .pop-panel {
256 position: absolute;
257 top: calc(100% + 4px);
258 right: 0;
259 z-index: 30;
260 width: min(420px, calc(100vw - 32px));
261 margin-top: 0;
262 }
263}
264
265// Two columns at 1100px and up: the directory and README, then the repo-meta aside.
266.repo-grid {
267 display: grid;
268 grid-template-columns: minmax(0, 1fr);
269 gap: 32px;
270 margin-top: 16px;
271}
272
273.repo-main {
274 min-width: 0;
275}
276
277.repo-meta {
278 display: grid;
279 gap: 28px;
280 align-content: start;
281 min-width: 0;
282
283 h2 {
284 margin: 0 0 10px;
285 font-size: 13px;
286 font-weight: 600;
287 color: var(--muted);
288 }
289
290 .branch-list {
291 margin: 0;
292 padding: 0;
293 list-style: none;
294 display: grid;
295 gap: 6px;
296 font-size: 14px;
297
298 code {
299 font-family: var(--mono);
300 font-size: 13.5px;
301 word-break: break-all;
302 }
303 }
304}
305
306@media (min-width: 1100px) {
307 .repo-grid {
308 grid-template-columns: minmax(0, 1fr) 260px;
309 gap: 40px;
310 align-items: start;
311 }
312}
313
314// Tab icons in the repo sidebar nav (`.tab-icon` is spaced by the shell styles).
315.repo-tabs .tab-icon svg {
316 width: 16px;
317 height: 16px;
318 fill: none;
319 stroke: currentColor;
320 stroke-width: 1.8;
321 stroke-linecap: round;
322 stroke-linejoin: round;
323}
324
325// Directory table: hover rows, monospace names, muted message and age.
326.tree-table {
327 .kind {
328 display: inline-flex;
329 align-items: center;
330 min-width: 0;
331 margin-right: 10px;
332 vertical-align: middle;
333 color: var(--muted);
334 }
335
336 .kind-icon {
337 flex: none;
338 width: 16px;
339 height: 16px;
340 fill: none;
341 stroke: currentColor;
342 stroke-width: 1.8;
343 stroke-linecap: round;
344 stroke-linejoin: round;
345 }
346
347 th {
348 padding: 10px 12px 10px 0;
349 font-size: 12.5px;
350 font-weight: 600;
351 color: var(--muted);
352 border-bottom: 1px solid var(--border);
353 }
354
355 td {
356 padding: 11px 12px 11px 0;
357 vertical-align: middle;
358 border-bottom: 1px solid var(--border);
359 }
360
361 tbody tr:hover td {
362 background: var(--surface-2);
363 }
364
365 .tree-label > a,
366 .tree-label > span {
367 font-family: var(--mono);
368 font-size: 14px;
369 color: var(--text);
370 }
371
372 .tree-label > a:hover {
373 color: var(--accent-ink);
374 text-decoration: none;
375 }
376
377 .tree-commit a {
378 font-size: 14px;
379 color: var(--muted);
380 }
381
382 .tree-commit a:hover {
383 color: var(--text);
384 text-decoration: none;
385 }
386
387 .age {
388 font-size: 13px;
389 color: var(--muted);
390 }
391}
392
393// Branch and tag tables: the name and its "default" badge stay on one line; long names wrap inside.
394.refs-table .tree-label {
395 flex-wrap: nowrap;
396 align-items: center;
397
398 a {
399 min-width: 0;
400 overflow-wrap: anywhere;
401 }
402
403 .badge {
404 flex: none;
405 }
406}
407
408// README card: a header strip with the file name, then padded body.
409.readme {
410 margin-top: 24px;
411 padding: 0;
412 overflow: hidden;
413
414 .readme-name {
415 display: flex;
416 align-items: center;
417 gap: 8px;
418 margin: 0;
419 padding: 10px 20px;
420 font-size: 13px;
421 color: var(--muted);
422 background: var(--surface-2);
423 border-bottom: 1px solid var(--border);
424 }
425
426 .markdown-body,
427 .readme-text {
428 padding: 20px 24px 24px;
429 }
430
431 .readme-text {
432 margin: 0;
433 font-size: 14px;
434 }
435}
436
437// File viewer: the header strip matches the README strip.
438.file-head {
439 padding: 10px 16px;
440 font-size: 14px;
441 background: var(--surface-2);
442}
443
444// Commit header card: paragraphs spaced evenly, no extra gap above the first line.
445.commit-info {
446 > p {
447 margin: 0 0 10px;
448 }
449
450 > p:last-child {
451 margin-bottom: 0;
452 }
453}
454
455// Settings sub-navigation: a horizontal row of links; the current one is underlined in the accent.
456.settings-nav {
457 display: flex;
458 flex-wrap: wrap;
459 gap: 4px 20px;
460 margin: 0 0 20px;
461 border-bottom: 1px solid var(--border);
462
463 a {
464 margin-bottom: -1px;
465 padding: 8px 2px 10px;
466 font-size: 14px;
467 color: var(--muted);
468 text-decoration: none;
469 border-bottom: 2px solid transparent;
470
471 &:hover {
472 color: var(--text);
473 }
474
475 &[aria-current="page"] {
476 color: var(--text);
477 font-weight: 600;
478 border-bottom-color: var(--accent);
479 }
480 }
481}
482
483// Commit list: one row per commit, muted metadata, mono hash.
484.commit-list {
485 border-top: 1px solid var(--border);
486}
487
488.commit-row {
489 padding: 14px 0;
490 border-bottom: 1px solid var(--border);
491}
492
493.commit-summary {
494 font-size: 15px;
495 font-weight: 600;
496 color: var(--text);
497}
498
499.commit-meta {
500 font-size: 13px;
501 color: var(--muted);
502}
503
504.commit-actions {
505 font-size: 13.5px;
506 color: var(--text-2);
507}
508
509.commit-oid {
510 padding: 2px 8px;
511 font-family: var(--mono);
512 font-size: 13px;
513 color: var(--accent-ink);
514 background: var(--surface-2);
515 border: 1px solid var(--border);
516 border-radius: 999px;
517
518 &:hover {
519 border-color: var(--accent);
520 text-decoration: none;
521 }
522}
523
524.role-list {
525 display: grid;
526 gap: 4px 0;
527 margin: 0;
528
529 dt {
530 font-weight: 600;
531 color: var(--text);
532 }
533
534 dd {
535 margin: 0 0 8px;
536 color: var(--muted);
537 }
538
539 @media (min-width: 640px) {
540 grid-template-columns: max-content 1fr;
541 gap: 8px 24px;
542 align-items: baseline;
543
544 dd {
545 margin: 0;
546 }
547 }
548}
549
550// New repository (new_repo.rs): one column like the snippet editor, 880px at most. A header row
551// (title, visibility pill, Create), a card for the name, description and options, and a collapsed
552// mirror card. Tokens only, so both themes follow main.scss.
553.newrepo-form {
554 display: flex;
555 flex-direction: column;
556 gap: 16px;
557 max-width: 880px;
558 width: 100%;
559 min-width: 0;
560
561 svg {
562 flex: none;
563 width: 16px;
564 height: 16px;
565 fill: none;
566 stroke: currentColor;
567 stroke-width: 2;
568 stroke-linecap: round;
569 stroke-linejoin: round;
570 }
571
572 textarea {
573 font-family: inherit;
574 font-size: inherit;
575 }
576
577 .newrepo-mono {
578 font-family: var(--mono);
579 font-size: 0.875rem;
580 }
581}
582
583.newrepo-head {
584 display: flex;
585 flex-wrap: wrap;
586 align-items: center;
587 gap: 12px 16px;
588
589 h1 {
590 margin: 0;
591 font-size: 1.5rem;
592 line-height: 1.25;
593 }
594}
595
596.newrepo-head-actions {
597 display: flex;
598 flex-wrap: wrap;
599 align-items: center;
600 gap: 10px;
601 margin-left: auto;
602}
603
604.newrepo-visibility {
605 min-width: 0;
606 margin: 0;
607 padding: 0;
608 border: 0;
609}
610
611// The card and the mirror section share one surface.
612.newrepo-card,
613.newrepo-mirror {
614 min-width: 0;
615 background: var(--surface);
616 border: 1px solid var(--border);
617 border-radius: 12px;
618 box-shadow: var(--shadow);
619}
620
621.newrepo-card {
622 display: flex;
623 flex-direction: column;
624 gap: 14px;
625 padding: 20px 22px;
626}
627
628.newrepo-row {
629 display: flex;
630 flex-wrap: wrap;
631 align-items: flex-end;
632 gap: 14px;
633}
634
635// Owner / name on one line: the owner is narrow, the name takes the rest.
636.newrepo-slug {
637 flex-wrap: nowrap;
638 gap: 8px;
639}
640
641.newrepo-owner {
642 flex: 0 1 200px;
643 min-width: 0;
644}
645
646.newrepo-name {
647 flex: 1 1 auto;
648 min-width: 0;
649}
650
651.newrepo-slash {
652 flex: none;
653 padding-bottom: 9px;
654 font-family: var(--mono);
655 font-size: 1.125rem;
656 line-height: 1;
657 color: var(--muted);
658}
659
660.newrepo-options {
661 .newrepo-branch {
662 flex: 0 1 240px;
663 min-width: 0;
664 }
665
666 .newrepo-labels {
667 align-self: flex-end;
668 min-height: 38px;
669 }
670}
671
672.newrepo-mirror {
673 > summary {
674 display: flex;
675 align-items: center;
676 justify-content: space-between;
677 gap: 12px;
678 padding: 16px 22px;
679 cursor: pointer;
680 list-style: none;
681 font-weight: 500;
682 font-size: 0.875rem;
683 color: var(--text-2);
684 border-radius: 12px;
685
686 &::-webkit-details-marker {
687 display: none;
688 }
689
690 &:focus-visible {
691 outline: 2px solid var(--focus);
692 outline-offset: -2px;
693 }
694 }
695
696 &[open] > summary {
697 border-bottom: 1px solid var(--border);
698 }
699
700 .newrepo-chev {
701 color: var(--muted);
702 transition: transform 0.15s ease;
703 }
704
705 &[open] .newrepo-chev {
706 transform: rotate(180deg);
707 }
708}
709
710.newrepo-mirror-body {
711 display: flex;
712 flex-direction: column;
713 gap: 14px;
714 padding: 18px 22px 20px;
715
716 .newrepo-half {
717 flex: 1 1 220px;
718 min-width: 0;
719 }
720
721 .newrepo-interval {
722 max-width: 320px;
723 }
724}
725
726@media (max-width: 560px) {
727 .newrepo-slug {
728 flex-direction: column;
729 align-items: stretch;
730 }
731
732 .newrepo-slash {
733 display: none;
734 }
735
736 .newrepo-owner {
737 flex-basis: auto;
738 }
739}
740
741@media (max-width: 480px) {
742 // Below 480px the visibility switch shows icons only, so Create fits beside it.
743 .newrepo-head-actions {
744 justify-content: space-between;
745 margin-left: 0;
746 width: 100%;
747 }
748
749 .newrepo-card {
750 padding: 16px;
751 }
752
753 .newrepo-mirror > summary {
754 padding: 14px 16px;
755 }
756
757 .newrepo-mirror-body {
758 padding: 16px;
759 }
760}