forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.09.3 MiB0d793e7Tahinli1 hour ago359 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 | // State badges: open is --ok, closed is --bad, merged is the soft purple. |
| 25 | |
| 26 | .issue-badge { |
| 27 | display: inline-flex; |
| 28 | align-items: center; |
| 29 | gap: 6px; |
| 30 | height: 26px; |
| 31 | padding: 0 11px; |
| 32 | border: 1px solid currentColor; |
| 33 | border-radius: var(--radius-full); |
| 34 | background: var(--surface-2); |
| 35 | font-size: 13.5px; |
| 36 | font-weight: 600; |
| 37 | line-height: 1; |
| 38 | |
| 39 | &.issue-badge-open { |
| 40 | color: var(--ok); |
| 41 | background: var(--surface); |
| 42 | } |
| 43 | |
| 44 | &.issue-badge-closed { |
| 45 | color: var(--bad); |
| 46 | background: var(--surface); |
| 47 | } |
| 48 | |
| 49 | &.issue-badge-merged { |
| 50 | border-color: transparent; |
| 51 | color: var(--merged); |
| 52 | background: var(--merged-soft); |
| 53 | } |
| 54 | |
| 55 | &.issue-badge-completed { |
| 56 | border-color: transparent; |
| 57 | color: var(--merged); |
| 58 | background: var(--merged-soft); |
| 59 | } |
| 60 | |
| 61 | &.issue-badge-not-planned { |
| 62 | color: var(--muted); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | .issue-row { |
| 67 | padding: 14px 16px; |
| 68 | border-top-color: var(--border); |
| 69 | |
| 70 | &:hover { |
| 71 | background: var(--surface-2); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | .issue-title { |
| 76 | color: var(--text); |
| 77 | font-weight: 600; |
| 78 | } |
| 79 | |
| 80 | // Side sections: 16px rhythm with a hairline between them. Controls are compact (32px), |
| 81 | // Save buttons are small outline buttons. A control and its Save button share a row; the |
| 82 | // help text sits directly under the control. |
| 83 | .issue-side-section { |
| 84 | padding-bottom: 16px; |
| 85 | margin-bottom: 16px; |
| 86 | border-bottom: 1px solid var(--border); |
| 87 | |
| 88 | input[type="text"], |
| 89 | select { |
| 90 | height: 32px; |
| 91 | box-sizing: border-box; |
| 92 | padding: 0 8px; |
| 93 | font-size: 13px; |
| 94 | } |
| 95 | |
| 96 | button { |
| 97 | height: 28px; |
| 98 | padding: 0 10px; |
| 99 | font-size: 13px; |
| 100 | color: var(--text); |
| 101 | background: var(--surface); |
| 102 | border: 1px solid var(--border-strong); |
| 103 | border-radius: var(--radius-md); |
| 104 | white-space: nowrap; |
| 105 | } |
| 106 | |
| 107 | form.stack { |
| 108 | display: grid; |
| 109 | grid-template-columns: minmax(0, 1fr) auto; |
| 110 | align-items: center; |
| 111 | gap: 8px; |
| 112 | |
| 113 | > * { |
| 114 | grid-column: 1 / -1; |
| 115 | } |
| 116 | |
| 117 | > input[type="text"], |
| 118 | > select { |
| 119 | grid-column: 1; |
| 120 | grid-row: 1; |
| 121 | } |
| 122 | |
| 123 | > input[type="text"] + p, |
| 124 | > select + p { |
| 125 | margin-top: -4px; |
| 126 | } |
| 127 | |
| 128 | // A control followed by a Save button: the button goes to the right, on the same row. |
| 129 | &:has(> input[type="text"], > select) > div { |
| 130 | grid-column: 2; |
| 131 | grid-row: 1; |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // Timeline items and reviews as cards: a surface-2 head strip over the body. |
| 137 | |
| 138 | .review-item { |
| 139 | border: 1px solid var(--border); |
| 140 | border-radius: var(--radius-lg); |
| 141 | background: var(--surface); |
| 142 | overflow: hidden; |
| 143 | } |
| 144 | |
| 145 | .issue-item-body { |
| 146 | padding: 14px 16px; |
| 147 | line-height: 1.6; |
| 148 | } |
| 149 | |
| 150 | // Merge box: a status headline with a coloured rule on the left, then the merge button. |
| 151 | |
| 152 | .merge-box { |
| 153 | gap: 14px; |
| 154 | padding: 18px 20px; |
| 155 | border: 1px solid var(--border); |
| 156 | border-left: 3px solid var(--border-strong); |
| 157 | border-radius: var(--radius-lg); |
| 158 | background: var(--surface); |
| 159 | |
| 160 | &.merge-ok { |
| 161 | border-left-color: var(--ok); |
| 162 | background: var(--surface); |
| 163 | } |
| 164 | |
| 165 | &.merge-bad { |
| 166 | border-left-color: var(--bad); |
| 167 | background: var(--surface); |
| 168 | } |
| 169 | |
| 170 | &.merge-muted { |
| 171 | border-left-color: var(--border-strong); |
| 172 | color: var(--muted); |
| 173 | } |
| 174 | |
| 175 | &.merge-merged { |
| 176 | border-left-color: var(--merged); |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | .merge-headline { |
| 181 | display: flex; |
| 182 | align-items: center; |
| 183 | gap: 8px; |
| 184 | font-size: 15px; |
| 185 | font-weight: 600; |
| 186 | color: var(--text); |
| 187 | |
| 188 | &::before { |
| 189 | content: ""; |
| 190 | flex: none; |
| 191 | width: 8px; |
| 192 | height: 8px; |
| 193 | border-radius: 50%; |
| 194 | background: currentColor; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | .merge-ok .merge-headline { |
| 199 | color: var(--ok); |
| 200 | } |
| 201 | |
| 202 | .merge-bad .merge-headline { |
| 203 | color: var(--bad); |
| 204 | } |
| 205 | |
| 206 | .merge-merged .merge-headline { |
| 207 | color: var(--merged); |
| 208 | } |
| 209 | |
| 210 | .merge-muted .merge-headline { |
| 211 | color: var(--muted); |
| 212 | } |
| 213 | |
| 214 | .merge-box button[type="submit"] { |
| 215 | width: 100%; |
| 216 | height: var(--control-h); |
| 217 | border: 1px solid var(--accent); |
| 218 | border-radius: var(--radius-md); |
| 219 | background: var(--accent); |
| 220 | color: var(--accent-text); |
| 221 | font-weight: 600; |
| 222 | cursor: pointer; |
| 223 | |
| 224 | &:hover { |
| 225 | border-color: var(--accent-ink); |
| 226 | background: var(--accent-ink); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | // Checks: status icons in the status colours, one row each. |
| 231 | |
| 232 | .checks-summary { |
| 233 | gap: 8px; |
| 234 | font-size: 14px; |
| 235 | |
| 236 | &.status-success > .status-icon { |
| 237 | color: var(--ok); |
| 238 | } |
| 239 | |
| 240 | &.status-failure > .status-icon { |
| 241 | color: var(--bad); |
| 242 | } |
| 243 | |
| 244 | &.status-pending > .status-icon { |
| 245 | color: var(--heat-3); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | .status-icon { |
| 250 | &.status-success { |
| 251 | color: var(--ok); |
| 252 | } |
| 253 | |
| 254 | &.status-failure { |
| 255 | color: var(--bad); |
| 256 | } |
| 257 | |
| 258 | &.status-pending { |
| 259 | color: var(--heat-3); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | .status-list { |
| 264 | gap: 10px; |
| 265 | } |
| 266 | |
| 267 | .status-item { |
| 268 | align-items: center; |
| 269 | gap: 8px; |
| 270 | font-size: 14px; |
| 271 | } |
| 272 | |
| 273 | // Diffs: a file card with a sticky header strip, mono code, and add/del rows marked on the left. |
| 274 | |
| 275 | .diff-file { |
| 276 | max-width: 100%; |
| 277 | margin: 0 0 24px; |
| 278 | border-color: var(--border); |
| 279 | border-radius: var(--radius-lg); |
| 280 | background: var(--surface); |
| 281 | overflow: visible; |
| 282 | } |
| 283 | |
| 284 | .diff-file-header { |
| 285 | position: sticky; |
| 286 | top: var(--topbar-h); |
| 287 | z-index: 2; |
| 288 | display: flex; |
| 289 | align-items: center; |
| 290 | justify-content: space-between; |
| 291 | flex-wrap: wrap; |
| 292 | gap: 6px 16px; |
| 293 | padding: 10px 14px; |
| 294 | border-radius: var(--radius-lg) var(--radius-lg) 0 0; |
| 295 | background: var(--surface-2); |
| 296 | font-size: 13.5px; |
| 297 | } |
| 298 | |
| 299 | // Inside a pane the pane scrolls, not the page, so the header sticks to the pane's own top edge. |
| 300 | .fit-pane .diff-file-header { |
| 301 | top: 0; |
| 302 | } |
| 303 | |
| 304 | // Path on the left; status and counts grouped on the right. |
| 305 | .diff-path { |
| 306 | min-width: 0; |
| 307 | overflow-wrap: anywhere; |
| 308 | font-family: var(--mono); |
| 309 | color: var(--text); |
| 310 | } |
| 311 | |
| 312 | .diff-file-body { |
| 313 | border: 0; |
| 314 | border-radius: 0 0 var(--radius-lg) var(--radius-lg); |
| 315 | background: var(--surface); |
| 316 | overflow-x: auto; |
| 317 | overflow-y: hidden; |
| 318 | } |
| 319 | |
| 320 | .diff-stats { |
| 321 | font-size: 13px; |
| 322 | |
| 323 | .add { |
| 324 | color: var(--add-mark); |
| 325 | } |
| 326 | |
| 327 | .del { |
| 328 | color: var(--del-mark); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | .diff-table { |
| 333 | font-size: 12.5px; |
| 334 | line-height: 20px; |
| 335 | |
| 336 | .diff-line { |
| 337 | > .diff-ln { |
| 338 | background: var(--surface); |
| 339 | } |
| 340 | |
| 341 | &.add { |
| 342 | background: var(--add-bg); |
| 343 | |
| 344 | > .diff-ln { |
| 345 | background: var(--add-bg); |
| 346 | } |
| 347 | |
| 348 | > td:first-child { |
| 349 | box-shadow: inset 3px 0 0 var(--add-mark); |
| 350 | } |
| 351 | |
| 352 | .diff-code { |
| 353 | color: var(--add-text); |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | &.del { |
| 358 | background: var(--del-bg); |
| 359 | |
| 360 | > .diff-ln { |
| 361 | background: var(--del-bg); |
| 362 | } |
| 363 | |
| 364 | > td:first-child { |
| 365 | box-shadow: inset 3px 0 0 var(--del-mark); |
| 366 | } |
| 367 | |
| 368 | .diff-code { |
| 369 | color: var(--del-text); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | &.ctx .diff-code { |
| 374 | color: var(--text); |
| 375 | } |
| 376 | |
| 377 | &.hunk { |
| 378 | background: var(--hunk-bg); |
| 379 | |
| 380 | > td { |
| 381 | background: var(--hunk-bg); |
| 382 | color: var(--muted); |
| 383 | } |
| 384 | |
| 385 | .diff-code { |
| 386 | padding-top: 4px; |
| 387 | padding-bottom: 4px; |
| 388 | color: var(--muted); |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | .diff-ln { |
| 394 | min-width: 3.5em; |
| 395 | padding: 0 10px; |
| 396 | color: var(--ln-text); |
| 397 | border-right: 1px solid var(--border); |
| 398 | } |
| 399 | |
| 400 | .diff-code { |
| 401 | padding: 0 18px 0 12px; |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | .diff-collapsed { |
| 406 | margin: 0; |
| 407 | padding: 12px 14px; |
| 408 | border: 0; |
| 409 | background: var(--surface); |
| 410 | color: var(--muted); |
| 411 | font-size: 14px; |
| 412 | } |
| 413 | |
| 414 | // Changed-file summary: a compact list of mono paths with their counts, no bullets. |
| 415 | |
| 416 | .diff-index { |
| 417 | list-style: none; |
| 418 | margin: 8px 0 16px; |
| 419 | padding: 0; |
| 420 | font-size: 13px; |
| 421 | |
| 422 | li { |
| 423 | display: flex; |
| 424 | flex-wrap: wrap; |
| 425 | align-items: baseline; |
| 426 | gap: 2px 10px; |
| 427 | padding: 5px 0; |
| 428 | min-width: 0; |
| 429 | border-bottom: 1px solid var(--border); |
| 430 | |
| 431 | &:last-child { |
| 432 | border-bottom: 0; |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | a { |
| 437 | min-width: 0; |
| 438 | overflow-wrap: anywhere; |
| 439 | font-family: var(--mono); |
| 440 | color: var(--text); |
| 441 | |
| 442 | &:hover { |
| 443 | color: var(--text); |
| 444 | } |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | // Narrow screens: the diff scrolls inside its own box, never the page. |
| 449 | |
| 450 | @media (max-width: 600px) { |
| 451 | |
| 452 | .diff-file-header { |
| 453 | padding: 8px 12px; |
| 454 | } |
| 455 | |
| 456 | .diff-table .diff-code { |
| 457 | padding-right: 14px; |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | input[type="color"] { |
| 462 | width: 56px; |
| 463 | height: var(--control-h, 36px); |
| 464 | padding: 3px; |
| 465 | box-sizing: border-box; |
| 466 | border: 1px solid var(--border-strong); |
| 467 | border-radius: var(--radius-md); |
| 468 | background: var(--surface); |
| 469 | cursor: pointer; |
| 470 | } |