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