// pull: sage restyle of the pull request view (header, subnav, merge box, checks, side panel), // its files and commits diffs, the timeline cards, and the issue and pull request lists. // Imported after main.scss, so these rules win on equal specificity. Colour comes from tokens, // except the merged purple defined once below. // Merged state: a softened purple that sits beside the sage accent without matching it. :root { --merged: #6b4fa0; --merged-soft: #efeaf6; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --merged: #c7b3ee; --merged-soft: #2b2440; } } :root[data-theme="dark"] { --merged: #c7b3ee; --merged-soft: #2b2440; } // Subnav: underline tabs. Scrolls sideways on narrow screens instead of wrapping. .subnav { flex-wrap: nowrap; gap: 26px; margin: 16px 0 0; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; } .subnav-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0 12px; border-bottom: 0; color: var(--muted); font-weight: 500; white-space: nowrap; &:hover { color: var(--text); text-decoration: none; } &.current { color: var(--text); font-weight: 600; &::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); } } } // Pull request header and byline .issue-heading { margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; } .issue-number { font-family: var(--mono); font-size: 0.9em; font-weight: 500; } .issue-byline { gap: 8px 12px; margin: 12px 0 0; font-size: 14px; strong { color: var(--text); font-weight: 600; } code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 12.5px; } } // State badges: open is --ok, closed is --bad, merged is the soft purple. .issue-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border: 1px solid currentColor; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; line-height: 1; &.issue-badge-open { color: var(--ok); background: var(--surface); } &.issue-badge-closed { color: var(--bad); background: var(--surface); } &.issue-badge-merged { border-color: transparent; color: var(--merged); background: var(--merged-soft); } &.issue-badge-completed { border-color: transparent; color: var(--merged); background: var(--merged-soft); } &.issue-badge-not-planned { color: var(--muted); } } // Lists: rows with hairline borders, hover tint. .issue-list { border-color: var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: none; } .issue-row { padding: 14px 16px; border-top-color: var(--border); transition: background 0.12s ease; &:hover { background: var(--surface-2); } } .issue-title { color: var(--text); font-weight: 600; } .issue-meta { font-size: 13.5px; } .issue-state { width: 14px; height: 14px; margin-top: 0.2rem; border-width: 2px; } .issue-state-open { border-color: var(--ok); background: var(--surface); } .issue-state-closed { border-color: var(--merged); background: var(--merged); } .issue-state.pull-state-closed { border-color: var(--bad); background: var(--bad); } .issue-state.pull-state-merged { border-color: var(--merged); background: var(--merged); } // Layout: the side panel sits in a 260px column from 1000px wide. .issue-layout { align-items: start; } @media (min-width: 1000px) { .issue-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; } } // Breathing room between the header meta line (or the PR tabs) and the discussion. .issue-head + .issue-layout, .subnav + .issue-layout { margin-top: 16px; } .issue-sidebar { gap: 0; align-content: start; min-width: 0; font-size: 14px; h2 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; } } // Side sections: 16px rhythm with a hairline between them. Controls are compact (32px), // Save buttons are small outline buttons. A control and its Save button share a row; the // help text sits directly under the control. .issue-side-section { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); input[type="text"], select { height: 32px; box-sizing: border-box; padding: 0 8px; font-size: 13px; } button { height: 28px; padding: 0 10px; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); white-space: nowrap; } form.stack { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; > * { grid-column: 1 / -1; } > input[type="text"], > select { grid-column: 1; grid-row: 1; } > input[type="text"] + p, > select + p { margin-top: -4px; } // A control followed by a Save button: the button goes to the right, on the same row. &:has(> input[type="text"], > select) > div { grid-column: 2; grid-row: 1; } } } // Timeline items and reviews as cards: a surface-2 head strip over the body. .issue-item, .review-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; } .issue-item-head { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 13.5px; } .issue-item-body { padding: 14px 16px; line-height: 1.6; } // Merge box: a status headline with a coloured rule on the left, then the merge button. .merge-box { gap: 14px; padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); &.merge-ok { border-left-color: var(--ok); background: var(--surface); } &.merge-bad { border-left-color: var(--bad); background: var(--surface); } &.merge-muted { border-left-color: var(--border-strong); color: var(--muted); } &.merge-merged { border-left-color: var(--merged); } } .merge-headline { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; color: var(--text); &::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; } } .merge-ok .merge-headline { color: var(--ok); } .merge-bad .merge-headline { color: var(--bad); } .merge-merged .merge-headline { color: var(--merged); } .merge-muted .merge-headline { color: var(--muted); } .merge-box button[type="submit"] { width: 100%; height: 38px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-text); font-weight: 600; cursor: pointer; &:hover { border-color: var(--accent-ink); background: var(--accent-ink); } } // Checks: status icons in the status colours, one row each. .checks-summary { gap: 8px; font-size: 14px; &.status-success > .status-icon { color: var(--ok); } &.status-failure > .status-icon { color: var(--bad); } &.status-pending > .status-icon { color: var(--warn); } } .status-icon { &.status-success { color: var(--ok); } &.status-failure { color: var(--bad); } &.status-pending { color: var(--warn); } } .status-list { gap: 10px; } .status-item { align-items: center; gap: 8px; font-size: 14px; } // Diffs: a file card with a sticky header strip, mono code, and add/del rows marked on the left. .diff-file { max-width: 100%; margin: 0 0 24px; border-color: var(--border); border-radius: var(--radius); background: var(--surface); overflow: visible; } .diff-file-header { position: sticky; top: var(--topbar-h); z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); font-size: 13.5px; } // Path on the left; status and counts grouped on the right. .diff-path { min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); color: var(--text); } .diff-file-meta { display: inline-flex; align-items: center; flex-shrink: 0; gap: 12px; } .diff-file-body { border: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); overflow-x: auto; overflow-y: hidden; } .diff-stats { font-size: 13px; .add { color: var(--add-mark); } .del { color: var(--del-mark); } } .diff-table { font-size: 12.5px; line-height: 20px; .diff-line { > .diff-ln { background: var(--surface); } &.add { background: var(--add-bg); > .diff-ln { background: var(--add-bg); } > td:first-child { box-shadow: inset 3px 0 0 var(--add-mark); } .diff-code { color: var(--add-text); } } &.del { background: var(--del-bg); > .diff-ln { background: var(--del-bg); } > td:first-child { box-shadow: inset 3px 0 0 var(--del-mark); } .diff-code { color: var(--del-text); } } &.ctx .diff-code { color: var(--text); } &.hunk { background: var(--hunk-bg); > td { background: var(--hunk-bg); color: var(--muted); } .diff-code { padding-top: 4px; padding-bottom: 4px; color: var(--muted); } } } .diff-ln { min-width: 3.5em; padding: 0 10px; color: var(--ln-text); border-right: 1px solid var(--border); } .diff-code { padding: 0 18px 0 12px; } } .diff-collapsed { margin: 0; padding: 12px 14px; border: 0; background: var(--surface); color: var(--muted); font-size: 14px; } // Changed-file summary: a compact list of mono paths with their counts, no bullets. .diff-index { list-style: none; margin: 8px 0 16px; padding: 0; font-size: 13px; li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 5px 0; min-width: 0; border-bottom: 1px solid var(--border); &:last-child { border-bottom: 0; } } a { min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); color: var(--text); &:hover { color: var(--accent-text); } } } // New issue: label checkboxes sit in a wrapping row, box beside name. .label-picker { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; } input[type="checkbox"] { width: auto; margin: 0; } } // Review bar: radios as a row of options, actions as a row with Submit primary and Discard quiet. .review-bar { .review-choices { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 22px; label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; } input[type="radio"] { width: auto; margin: 0; } } .review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; .review-inline .link-button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; &:hover { color: var(--text); } } } } // Narrow screens: the diff scrolls inside its own box, never the page. @media (max-width: 600px) { .subnav { gap: 20px; } .diff-file-header { padding: 8px 12px; } .diff-table .diff-code { padding-right: 14px; } }