forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.010.5 MiBe587be7Tahinli11 hours ago323 commits
| 1 | // pull: sage restyle of the pull request view (header, subnav, merge box, checks, side panel), |
| 2 | // its files and commits diffs, the timeline cards, and the issue and pull request lists. |
| 3 | // Imported after main.scss, so these rules win on equal specificity. Colour comes from tokens, |
| 4 | // except the merged purple defined once below. |
| 5 | |
| 6 | // Merged state: a softened purple that sits beside the sage accent without matching it. |
| 7 | :root { |
| 8 | --merged: #6b4fa0; |
| 9 | --merged-soft: #efeaf6; |
| 10 | } |
| 11 | |
| 12 | @media (prefers-color-scheme: dark) { |
| 13 | :root:not([data-theme="light"]) { |
| 14 | --merged: #c7b3ee; |
| 15 | --merged-soft: #2b2440; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | :root[data-theme="dark"] { |
| 20 | --merged: #c7b3ee; |
| 21 | --merged-soft: #2b2440; |
| 22 | } |
| 23 | |
| 24 | // Pull request header and byline |
| 25 | |
| 26 | .issue-heading { |
| 27 | margin: 0.25rem 0 0; |
| 28 | font-size: 1.5rem; |
| 29 | font-weight: 600; |
| 30 | line-height: 1.3; |
| 31 | letter-spacing: -0.01em; |
| 32 | } |
| 33 | |
| 34 | .issue-number { |
| 35 | font-family: var(--mono); |
| 36 | font-size: 0.9em; |
| 37 | font-weight: 500; |
| 38 | } |
| 39 | |
| 40 | .issue-byline { |
| 41 | gap: 8px 12px; |
| 42 | margin: 12px 0 0; |
| 43 | font-size: 14px; |
| 44 | |
| 45 | strong { |
| 46 | color: var(--text); |
| 47 | font-weight: 600; |
| 48 | } |
| 49 | |
| 50 | code { |
| 51 | padding: 1px 6px; |
| 52 | border-radius: var(--radius-sm); |
| 53 | background: var(--surface-2); |
| 54 | color: var(--text); |
| 55 | font-family: var(--mono); |
| 56 | font-size: 12.5px; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // State badges: open is --ok, closed is --bad, merged is the soft purple. |
| 61 | |
| 62 | .issue-badge { |
| 63 | display: inline-flex; |
| 64 | align-items: center; |
| 65 | gap: 6px; |
| 66 | height: 26px; |
| 67 | padding: 0 11px; |
| 68 | border: 1px solid currentColor; |
| 69 | border-radius: var(--radius-full); |
| 70 | background: var(--surface-2); |
| 71 | font-size: 13.5px; |
| 72 | font-weight: 600; |
| 73 | line-height: 1; |
| 74 | |
| 75 | &.issue-badge-open { |
| 76 | color: var(--ok); |
| 77 | background: var(--surface); |
| 78 | } |
| 79 | |
| 80 | &.issue-badge-closed { |
| 81 | color: var(--bad); |
| 82 | background: var(--surface); |
| 83 | } |
| 84 | |
| 85 | &.issue-badge-merged { |
| 86 | border-color: transparent; |
| 87 | color: var(--merged); |
| 88 | background: var(--merged-soft); |
| 89 | } |
| 90 | |
| 91 | &.issue-badge-completed { |
| 92 | border-color: transparent; |
| 93 | color: var(--merged); |
| 94 | background: var(--merged-soft); |
| 95 | } |
| 96 | |
| 97 | &.issue-badge-not-planned { |
| 98 | color: var(--muted); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // Lists: rows with hairline borders, hover tint. |
| 103 | |
| 104 | .issue-list { |
| 105 | border-color: var(--border); |
| 106 | border-radius: var(--radius-lg); |
| 107 | background: var(--surface); |
| 108 | box-shadow: none; |
| 109 | } |
| 110 | |
| 111 | .issue-row { |
| 112 | padding: 14px 16px; |
| 113 | border-top-color: var(--border); |
| 114 | |
| 115 | &:hover { |
| 116 | background: var(--surface-2); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | .issue-title { |
| 121 | color: var(--text); |
| 122 | font-weight: 600; |
| 123 | } |
| 124 | |
| 125 | .issue-meta { |
| 126 | font-size: 13.5px; |
| 127 | } |
| 128 | |
| 129 | .issue-state { |
| 130 | width: 14px; |
| 131 | height: 14px; |
| 132 | margin-top: 0.2rem; |
| 133 | border-width: 2px; |
| 134 | } |
| 135 | |
| 136 | .issue-state-open { |
| 137 | border-color: var(--ok); |
| 138 | background: var(--surface); |
| 139 | } |
| 140 | |
| 141 | .issue-state-closed { |
| 142 | border-color: var(--merged); |
| 143 | background: var(--merged); |
| 144 | } |
| 145 | |
| 146 | .issue-state.pull-state-closed { |
| 147 | border-color: var(--bad); |
| 148 | background: var(--bad); |
| 149 | } |
| 150 | |
| 151 | .issue-state.pull-state-merged { |
| 152 | border-color: var(--merged); |
| 153 | background: var(--merged); |
| 154 | } |
| 155 | |
| 156 | // Layout: the side panel sits in a 260px column from 1000px wide. |
| 157 | |
| 158 | .issue-layout { |
| 159 | align-items: start; |
| 160 | } |
| 161 | |
| 162 | @media (min-width: 1000px) { |
| 163 | .issue-layout { |
| 164 | grid-template-columns: minmax(0, 1fr) 260px; |
| 165 | gap: 40px; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // Breathing room between the header meta line (or the PR tabs) and the discussion. |
| 170 | .issue-head + .issue-layout { |
| 171 | margin-top: 16px; |
| 172 | } |
| 173 | |
| 174 | .issue-sidebar { |
| 175 | gap: 0; |
| 176 | align-content: start; |
| 177 | min-width: 0; |
| 178 | font-size: 14px; |
| 179 | |
| 180 | h2 { |
| 181 | margin: 0 0 8px; |
| 182 | color: var(--muted); |
| 183 | font-size: 12px; |
| 184 | font-weight: 600; |
| 185 | letter-spacing: 0.04em; |
| 186 | text-transform: uppercase; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // Side sections: 16px rhythm with a hairline between them. Controls are compact (32px), |
| 191 | // Save buttons are small outline buttons. A control and its Save button share a row; the |
| 192 | // help text sits directly under the control. |
| 193 | .issue-side-section { |
| 194 | padding-bottom: 16px; |
| 195 | margin-bottom: 16px; |
| 196 | border-bottom: 1px solid var(--border); |
| 197 | |
| 198 | input[type="text"], |
| 199 | select { |
| 200 | height: 32px; |
| 201 | box-sizing: border-box; |
| 202 | padding: 0 8px; |
| 203 | font-size: 13px; |
| 204 | } |
| 205 | |
| 206 | button { |
| 207 | height: 28px; |
| 208 | padding: 0 10px; |
| 209 | font-size: 13px; |
| 210 | color: var(--text); |
| 211 | background: var(--surface); |
| 212 | border: 1px solid var(--border-strong); |
| 213 | border-radius: var(--radius-md); |
| 214 | white-space: nowrap; |
| 215 | } |
| 216 | |
| 217 | form.stack { |
| 218 | display: grid; |
| 219 | grid-template-columns: minmax(0, 1fr) auto; |
| 220 | align-items: center; |
| 221 | gap: 8px; |
| 222 | |
| 223 | > * { |
| 224 | grid-column: 1 / -1; |
| 225 | } |
| 226 | |
| 227 | > input[type="text"], |
| 228 | > select { |
| 229 | grid-column: 1; |
| 230 | grid-row: 1; |
| 231 | } |
| 232 | |
| 233 | > input[type="text"] + p, |
| 234 | > select + p { |
| 235 | margin-top: -4px; |
| 236 | } |
| 237 | |
| 238 | // A control followed by a Save button: the button goes to the right, on the same row. |
| 239 | &:has(> input[type="text"], > select) > div { |
| 240 | grid-column: 2; |
| 241 | grid-row: 1; |
| 242 | } |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | // Timeline items and reviews as cards: a surface-2 head strip over the body. |
| 247 | |
| 248 | .issue-item, |
| 249 | .review-item { |
| 250 | border: 1px solid var(--border); |
| 251 | border-radius: var(--radius-lg); |
| 252 | background: var(--surface); |
| 253 | overflow: hidden; |
| 254 | } |
| 255 | |
| 256 | .issue-item-head { |
| 257 | padding: 10px 14px; |
| 258 | border-bottom: 1px solid var(--border); |
| 259 | background: var(--surface-2); |
| 260 | font-size: 13.5px; |
| 261 | } |
| 262 | |
| 263 | .issue-item-body { |
| 264 | padding: 14px 16px; |
| 265 | line-height: 1.6; |
| 266 | } |
| 267 | |
| 268 | // Merge box: a status headline with a coloured rule on the left, then the merge button. |
| 269 | |
| 270 | .merge-box { |
| 271 | gap: 14px; |
| 272 | padding: 18px 20px; |
| 273 | border: 1px solid var(--border); |
| 274 | border-left: 3px solid var(--border-strong); |
| 275 | border-radius: var(--radius-lg); |
| 276 | background: var(--surface); |
| 277 | |
| 278 | &.merge-ok { |
| 279 | border-left-color: var(--ok); |
| 280 | background: var(--surface); |
| 281 | } |
| 282 | |
| 283 | &.merge-bad { |
| 284 | border-left-color: var(--bad); |
| 285 | background: var(--surface); |
| 286 | } |
| 287 | |
| 288 | &.merge-muted { |
| 289 | border-left-color: var(--border-strong); |
| 290 | color: var(--muted); |
| 291 | } |
| 292 | |
| 293 | &.merge-merged { |
| 294 | border-left-color: var(--merged); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | .merge-headline { |
| 299 | display: flex; |
| 300 | align-items: center; |
| 301 | gap: 8px; |
| 302 | font-size: 15px; |
| 303 | font-weight: 600; |
| 304 | color: var(--text); |
| 305 | |
| 306 | &::before { |
| 307 | content: ""; |
| 308 | flex: none; |
| 309 | width: 8px; |
| 310 | height: 8px; |
| 311 | border-radius: 50%; |
| 312 | background: currentColor; |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | .merge-ok .merge-headline { |
| 317 | color: var(--ok); |
| 318 | } |
| 319 | |
| 320 | .merge-bad .merge-headline { |
| 321 | color: var(--bad); |
| 322 | } |
| 323 | |
| 324 | .merge-merged .merge-headline { |
| 325 | color: var(--merged); |
| 326 | } |
| 327 | |
| 328 | .merge-muted .merge-headline { |
| 329 | color: var(--muted); |
| 330 | } |
| 331 | |
| 332 | .merge-box button[type="submit"] { |
| 333 | width: 100%; |
| 334 | height: var(--control-h); |
| 335 | border: 1px solid var(--accent); |
| 336 | border-radius: var(--radius-md); |
| 337 | background: var(--accent); |
| 338 | color: var(--accent-text); |
| 339 | font-weight: 600; |
| 340 | cursor: pointer; |
| 341 | |
| 342 | &:hover { |
| 343 | border-color: var(--accent-ink); |
| 344 | background: var(--accent-ink); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | // Checks: status icons in the status colours, one row each. |
| 349 | |
| 350 | .checks-summary { |
| 351 | gap: 8px; |
| 352 | font-size: 14px; |
| 353 | |
| 354 | &.status-success > .status-icon { |
| 355 | color: var(--ok); |
| 356 | } |
| 357 | |
| 358 | &.status-failure > .status-icon { |
| 359 | color: var(--bad); |
| 360 | } |
| 361 | |
| 362 | &.status-pending > .status-icon { |
| 363 | color: var(--heat-3); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | .status-icon { |
| 368 | &.status-success { |
| 369 | color: var(--ok); |
| 370 | } |
| 371 | |
| 372 | &.status-failure { |
| 373 | color: var(--bad); |
| 374 | } |
| 375 | |
| 376 | &.status-pending { |
| 377 | color: var(--heat-3); |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | .status-list { |
| 382 | gap: 10px; |
| 383 | } |
| 384 | |
| 385 | .status-item { |
| 386 | align-items: center; |
| 387 | gap: 8px; |
| 388 | font-size: 14px; |
| 389 | } |
| 390 | |
| 391 | // Diffs: a file card with a sticky header strip, mono code, and add/del rows marked on the left. |
| 392 | |
| 393 | .diff-file { |
| 394 | max-width: 100%; |
| 395 | margin: 0 0 24px; |
| 396 | border-color: var(--border); |
| 397 | border-radius: var(--radius-lg); |
| 398 | background: var(--surface); |
| 399 | overflow: visible; |
| 400 | } |
| 401 | |
| 402 | .diff-file-header { |
| 403 | position: sticky; |
| 404 | top: var(--topbar-h); |
| 405 | z-index: 2; |
| 406 | display: flex; |
| 407 | align-items: center; |
| 408 | justify-content: space-between; |
| 409 | flex-wrap: wrap; |
| 410 | gap: 6px 16px; |
| 411 | padding: 10px 14px; |
| 412 | border-radius: var(--radius-lg) var(--radius-lg) 0 0; |
| 413 | background: var(--surface-2); |
| 414 | font-size: 13.5px; |
| 415 | } |
| 416 | |
| 417 | // Inside a pane the pane scrolls, not the page, so the header sticks to the pane's own top edge. |
| 418 | .fit-pane .diff-file-header { |
| 419 | top: 0; |
| 420 | } |
| 421 | |
| 422 | // Path on the left; status and counts grouped on the right. |
| 423 | .diff-path { |
| 424 | min-width: 0; |
| 425 | overflow-wrap: anywhere; |
| 426 | font-family: var(--mono); |
| 427 | color: var(--text); |
| 428 | } |
| 429 | |
| 430 | .diff-file-meta { |
| 431 | display: inline-flex; |
| 432 | align-items: center; |
| 433 | flex-shrink: 0; |
| 434 | gap: 12px; |
| 435 | } |
| 436 | |
| 437 | .diff-file-body { |
| 438 | border: 0; |
| 439 | border-radius: 0 0 var(--radius-lg) var(--radius-lg); |
| 440 | background: var(--surface); |
| 441 | overflow-x: auto; |
| 442 | overflow-y: hidden; |
| 443 | } |
| 444 | |
| 445 | .diff-stats { |
| 446 | font-size: 13px; |
| 447 | |
| 448 | .add { |
| 449 | color: var(--add-mark); |
| 450 | } |
| 451 | |
| 452 | .del { |
| 453 | color: var(--del-mark); |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | .diff-table { |
| 458 | font-size: 12.5px; |
| 459 | line-height: 20px; |
| 460 | |
| 461 | .diff-line { |
| 462 | > .diff-ln { |
| 463 | background: var(--surface); |
| 464 | } |
| 465 | |
| 466 | &.add { |
| 467 | background: var(--add-bg); |
| 468 | |
| 469 | > .diff-ln { |
| 470 | background: var(--add-bg); |
| 471 | } |
| 472 | |
| 473 | > td:first-child { |
| 474 | box-shadow: inset 3px 0 0 var(--add-mark); |
| 475 | } |
| 476 | |
| 477 | .diff-code { |
| 478 | color: var(--add-text); |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | &.del { |
| 483 | background: var(--del-bg); |
| 484 | |
| 485 | > .diff-ln { |
| 486 | background: var(--del-bg); |
| 487 | } |
| 488 | |
| 489 | > td:first-child { |
| 490 | box-shadow: inset 3px 0 0 var(--del-mark); |
| 491 | } |
| 492 | |
| 493 | .diff-code { |
| 494 | color: var(--del-text); |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | &.ctx .diff-code { |
| 499 | color: var(--text); |
| 500 | } |
| 501 | |
| 502 | &.hunk { |
| 503 | background: var(--hunk-bg); |
| 504 | |
| 505 | > td { |
| 506 | background: var(--hunk-bg); |
| 507 | color: var(--muted); |
| 508 | } |
| 509 | |
| 510 | .diff-code { |
| 511 | padding-top: 4px; |
| 512 | padding-bottom: 4px; |
| 513 | color: var(--muted); |
| 514 | } |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | .diff-ln { |
| 519 | min-width: 3.5em; |
| 520 | padding: 0 10px; |
| 521 | color: var(--ln-text); |
| 522 | border-right: 1px solid var(--border); |
| 523 | } |
| 524 | |
| 525 | .diff-code { |
| 526 | padding: 0 18px 0 12px; |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | .diff-collapsed { |
| 531 | margin: 0; |
| 532 | padding: 12px 14px; |
| 533 | border: 0; |
| 534 | background: var(--surface); |
| 535 | color: var(--muted); |
| 536 | font-size: 14px; |
| 537 | } |
| 538 | |
| 539 | // Changed-file summary: a compact list of mono paths with their counts, no bullets. |
| 540 | |
| 541 | .diff-index { |
| 542 | list-style: none; |
| 543 | margin: 8px 0 16px; |
| 544 | padding: 0; |
| 545 | font-size: 13px; |
| 546 | |
| 547 | li { |
| 548 | display: flex; |
| 549 | flex-wrap: wrap; |
| 550 | align-items: baseline; |
| 551 | gap: 2px 10px; |
| 552 | padding: 5px 0; |
| 553 | min-width: 0; |
| 554 | border-bottom: 1px solid var(--border); |
| 555 | |
| 556 | &:last-child { |
| 557 | border-bottom: 0; |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | a { |
| 562 | min-width: 0; |
| 563 | overflow-wrap: anywhere; |
| 564 | font-family: var(--mono); |
| 565 | color: var(--text); |
| 566 | |
| 567 | &:hover { |
| 568 | color: var(--text); |
| 569 | } |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | // New issue: label checkboxes sit in a wrapping row, box beside name. |
| 574 | |
| 575 | .label-picker { |
| 576 | flex-direction: row; |
| 577 | flex-wrap: wrap; |
| 578 | gap: 8px 18px; |
| 579 | |
| 580 | label { |
| 581 | flex-direction: row; |
| 582 | align-items: center; |
| 583 | gap: 8px; |
| 584 | font-weight: 400; |
| 585 | } |
| 586 | |
| 587 | input[type="checkbox"] { |
| 588 | width: auto; |
| 589 | margin: 0; |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | // Review bar: radios as a row of options, actions as a row with Submit primary and Discard quiet. |
| 594 | |
| 595 | .review-bar { |
| 596 | .review-choices { |
| 597 | flex-direction: row; |
| 598 | flex-wrap: wrap; |
| 599 | align-items: center; |
| 600 | justify-content: flex-start; |
| 601 | gap: 8px 22px; |
| 602 | |
| 603 | label { |
| 604 | flex-direction: row; |
| 605 | align-items: center; |
| 606 | gap: 8px; |
| 607 | font-weight: 400; |
| 608 | } |
| 609 | |
| 610 | input[type="radio"] { |
| 611 | width: auto; |
| 612 | margin: 0; |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | .review-actions { |
| 617 | display: flex; |
| 618 | flex-wrap: wrap; |
| 619 | align-items: center; |
| 620 | gap: 8px 18px; |
| 621 | margin-top: 14px; |
| 622 | |
| 623 | .review-inline .link-button { |
| 624 | color: var(--muted); |
| 625 | text-decoration: underline; |
| 626 | text-underline-offset: 3px; |
| 627 | |
| 628 | &:hover { |
| 629 | color: var(--text); |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | // Narrow screens: the diff scrolls inside its own box, never the page. |
| 636 | |
| 637 | @media (max-width: 600px) { |
| 638 | |
| 639 | .diff-file-header { |
| 640 | padding: 8px 12px; |
| 641 | } |
| 642 | |
| 643 | .diff-table .diff-code { |
| 644 | padding-right: 14px; |
| 645 | } |
| 646 | } |
| 647 | |
| 648 | // Issue sidebar label checklist: box and chip on one left-aligned row. |
| 649 | .issue-side-section .issue-check { |
| 650 | flex-direction: row; |
| 651 | align-items: center; |
| 652 | justify-content: flex-start; |
| 653 | gap: 8px; |
| 654 | margin: 0 0 8px; |
| 655 | font-weight: 400; |
| 656 | |
| 657 | input[type="checkbox"] { |
| 658 | width: auto; |
| 659 | margin: 0; |
| 660 | flex: none; |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | // New issue label picker: the inline-form rule would otherwise flatten the row. |
| 665 | .label-picker label { |
| 666 | display: flex; |
| 667 | } |
| 668 | |
| 669 | // Labels page: Edit disclosure and Delete share a centre line; the colour well is a small swatch. |
| 670 | .label-actions { |
| 671 | align-items: center; |
| 672 | } |
| 673 | |
| 674 | input[type="color"] { |
| 675 | width: 56px; |
| 676 | height: var(--control-h, 36px); |
| 677 | padding: 3px; |
| 678 | box-sizing: border-box; |
| 679 | border: 1px solid var(--border-strong); |
| 680 | border-radius: var(--radius-md); |
| 681 | background: var(--surface); |
| 682 | cursor: pointer; |
| 683 | } |
| 684 | |
| 685 | // Discussions: category chip and the action bar under a post. |
| 686 | .discussion-category { |
| 687 | display: inline-flex; |
| 688 | align-items: center; |
| 689 | padding: 2px 10px; |
| 690 | border: 1px solid var(--border); |
| 691 | border-radius: var(--radius-full); |
| 692 | background: var(--surface-2); |
| 693 | color: var(--text); |
| 694 | font-size: 12.5px; |
| 695 | font-weight: 600; |
| 696 | } |
| 697 | |
| 698 | // Edit and new forms share one card width. |
| 699 | .issue-edit { |
| 700 | max-width: 60rem; |
| 701 | } |