// repo: sage redesign. Repo home header, browse bar with the Clone popover, directory table, // README card, commit list and the repo-meta aside. Colours come from tokens only so both themes // follow main.scss. // Header: name with the visibility pill on the left, outline actions on the right. .page-head { align-items: flex-start; gap: 16px 24px; margin-bottom: 12px; } // Title and visibility pill share one row, the pill vertically centred after the name. .repo-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; .badge { padding: 0 9px; font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; color: var(--muted); background: transparent; border: 1px solid var(--border-strong); border-radius: 999px; } } .repo-title { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--text); } // Visually hidden but still read by screen readers (labels for the watch select, icon labels). .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .header-actions { gap: 8px; align-items: center; // Small outline controls: Fork, Star, and the Watch level select with its Save button. .fork-button, .star-button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; &:hover { background: var(--surface-2); } &:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; } } .fork-form, .star-form, .watch-control { display: inline-flex; align-items: center; gap: 6px; margin: 0; } .watch-control .muted, .star-control .muted, > .muted { font-size: 13px; white-space: nowrap; } } .lead { margin: 0 0 16px; max-width: 70ch; font-size: 15px; line-height: 1.5; color: var(--text-2); } .repo-search { margin: 0 0 16px; input { height: 34px; max-width: 360px; font-size: 14px; } } // Browse bar: branch, archive links and the Clone popover, framed by hairlines. .browse-bar { margin: 20px 0 0; padding: 12px 0; font-size: 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); code { padding: 3px 10px; font-family: var(--mono); font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; } } .archive-links { font-size: 14px; color: var(--text-2); } // Clone popover. The panel sits under the button from 820px; below that it takes its own row. .clone { position: relative; margin-left: 0; // The summary is a primary button (class "button primary"); no disclosure marker. > summary { display: inline-flex; align-items: center; gap: 8px; height: 32px; list-style: none; cursor: pointer; &::-webkit-details-marker { display: none; } &::marker { content: ""; } svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } &:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; } } .pop-panel { width: 100%; margin-top: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); } label { display: block; margin: 14px 0 6px; font-size: 12.5px; color: var(--muted); } label:first-child { margin-top: 0; } input { width: 100%; height: 38px; padding: 0 12px; font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); &:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; } } .small { margin: 12px 0 0; } } @media (max-width: 819px) { .clone { order: 1; flex: 1 1 100%; } } @media (min-width: 820px) { .clone .pop-panel { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; width: min(420px, calc(100vw - 32px)); margin-top: 0; } } // Two columns at 900px and up: the directory and README take the remaining width, then a // narrow repo-meta aside (about 230px). Below 900px the aside stacks under the main column. .repo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 16px; } .repo-main { min-width: 0; } .repo-meta { display: grid; gap: 28px; align-content: start; min-width: 0; h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); } .branch-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; code { font-family: var(--mono); font-size: 13.5px; word-break: break-all; } } } @media (min-width: 900px) { .repo-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; align-items: start; } } // Tab icons in the repo sidebar nav (`.tab-icon` is spaced by the shell styles). .repo-tabs .tab-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } // Directory table: hover rows, monospace names, muted message and age. .tree-table { .kind { display: inline-flex; align-items: center; min-width: 0; margin-right: 10px; vertical-align: middle; color: var(--muted); } .kind-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } th { padding: 10px 12px 10px 0; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); } td { padding: 11px 12px 11px 0; vertical-align: middle; border-bottom: 1px solid var(--border); } tbody tr:hover td { background: var(--surface-2); } .tree-label > a, .tree-label > span { font-family: var(--mono); font-size: 14px; color: var(--text); } .tree-label > a:hover { color: var(--accent-ink); text-decoration: none; } .tree-commit a { font-size: 14px; color: var(--muted); } .tree-commit a:hover { color: var(--text); text-decoration: none; } .age { font-size: 13px; color: var(--muted); } } // Branch and tag tables: the name and its "default" badge stay on one line; long names wrap inside. .refs-table .tree-label { flex-wrap: nowrap; align-items: center; a { min-width: 0; overflow-wrap: anywhere; } .badge { flex: none; } } // README card: a header strip with the file name, then padded body. .readme { margin-top: 24px; padding: 0; overflow: hidden; .readme-name { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 20px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); } .markdown-body, .readme-text { padding: 20px 24px 24px; } .readme-text { margin: 0; font-size: 14px; } } // File viewer: the header strip matches the README strip. .file-head { padding: 10px 16px; font-size: 14px; background: var(--surface-2); } // Commit header card: paragraphs spaced evenly, no extra gap above the first line. .commit-info { > p { margin: 0 0 10px; } > p:last-child { margin-bottom: 0; } } // Settings sub-navigation: a horizontal row of links; the current one is underlined in the accent. .settings-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 20px; border-bottom: 1px solid var(--border); a { margin-bottom: -1px; padding: 8px 2px 10px; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; &:hover { color: var(--text); } &[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); } } } // Commit list: one row per commit, muted metadata, mono hash. .commit-list { border-top: 1px solid var(--border); } .commit-row { padding: 14px 0; border-bottom: 1px solid var(--border); } .commit-summary { font-size: 15px; font-weight: 600; color: var(--text); } .commit-meta { font-size: 13px; color: var(--muted); } .commit-actions { font-size: 13.5px; color: var(--text-2); } .commit-oid { padding: 2px 8px; font-family: var(--mono); font-size: 13px; color: var(--accent-ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; &:hover { border-color: var(--accent); text-decoration: none; } } .role-list { display: grid; gap: 4px 0; margin: 0; dt { font-weight: 600; color: var(--text); } dd { margin: 0 0 8px; color: var(--muted); } @media (min-width: 640px) { grid-template-columns: max-content 1fr; gap: 8px 24px; align-items: baseline; dd { margin: 0; } } } // New repository (new_repo.rs): one column like the snippet editor, 880px at most. A header row // (title, visibility pill, Create), a card for the name, description and options, and a collapsed // mirror card. Tokens only, so both themes follow main.scss. .newrepo-form { display: flex; flex-direction: column; gap: 16px; max-width: 960px; width: 100%; min-width: 0; svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } textarea { font-family: inherit; font-size: inherit; } .newrepo-mono { font-family: var(--mono); font-size: 0.875rem; } } .newrepo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; } } .newrepo-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; } .newrepo-visibility { min-width: 0; margin: 0; padding: 0; border: 0; } // The card and the mirror section share one surface. .newrepo-card, .newrepo-mirror { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); } .newrepo-card { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; } .newrepo-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; } // Owner / name on one line: the owner is narrow, the name takes the rest. .newrepo-slug { flex-wrap: nowrap; gap: 8px; } .newrepo-owner { flex: 0 1 200px; min-width: 0; } .newrepo-name { flex: 1 1 auto; min-width: 0; } .newrepo-slash { flex: none; padding-bottom: 9px; font-family: var(--mono); font-size: 1.125rem; line-height: 1; color: var(--muted); } .newrepo-options { .newrepo-branch { flex: 0 1 240px; min-width: 0; } .newrepo-labels { align-self: flex-end; min-height: 38px; } } .newrepo-mirror { > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; cursor: pointer; list-style: none; font-weight: 500; font-size: 0.875rem; color: var(--text-2); border-radius: 12px; &::-webkit-details-marker { display: none; } &:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; } } &[open] > summary { border-bottom: 1px solid var(--border); } .newrepo-chev { color: var(--muted); transition: transform 0.15s ease; } &[open] .newrepo-chev { transform: rotate(180deg); } } .newrepo-mirror-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 20px; .newrepo-half { flex: 1 1 220px; min-width: 0; } .newrepo-interval { max-width: 320px; } } @media (max-width: 560px) { .newrepo-slug { flex-direction: column; align-items: stretch; } .newrepo-slash { display: none; } .newrepo-owner { flex-basis: auto; } } @media (max-width: 480px) { // Below 480px the visibility switch shows icons only, so Create fits beside it. .newrepo-head-actions { justify-content: space-between; margin-left: 0; width: 100%; } .newrepo-card { padding: 16px; } .newrepo-mirror > summary { padding: 14px 16px; } .newrepo-mirror-body { padding: 16px; } }