@layer components { /* tables in a card, with a row cursor (j/k) */ .list { width: 100%; table-layout: fixed; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); border-collapse: separate; overflow: hidden; & th { height: 40px; padding: 0 var(--s3); white-space: nowrap; font: 600 var(--fs-xs) / 1 var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); background: var(--bg-raised); border-bottom: 1px solid var(--border); } & th a { text-decoration: none; } & th a:hover { color: var(--ink-hi); } & th[aria-sort="ascending"], & th[aria-sort="descending"] { color: var(--ink-hi); } & td { height: 40px; padding: 0 var(--s3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid var(--border); } & tbody tr:first-child td { border-top: 0; } & th.cur, & td.cur { width: 3px; padding: 0; } & tbody tr:hover { background: var(--bg-raised); } & tbody tr[data-cursor] { background: var(--bg-raised); } & tbody tr[data-cursor] .cur { background: var(--ink-hi); } & tbody tr[hidden] { display: none; } & td > a { text-decoration: none; } & td > a:first-child { color: var(--ink-hi); } & tr:hover td > a:first-child, & tr[data-cursor] td > a:first-child { text-decoration: underline; } & .c-sha, & .c-ref, & .c-kind, & .c-size, & .c-n { font-family: var(--mono); font-size: var(--fs-s); } & .c-sha a { color: var(--ink-dim); } & .c-when, & .c-who { font-size: var(--fs-s); } & .c-sub { color: var(--ink-dim); } } /* home: the repositories as cards in a grid (one column on a phone); the page is a stack of sections, so others can sit beside or below */ .home { display: flex; flex-direction: column; gap: var(--s5); & .home-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s4); } & .home-bar .filter { flex: 1 1 260px; } & .sort { display: flex; align-items: center; gap: var(--s1); font-size: var(--fs-s); } & .sort > .mute { margin-right: var(--s1); } & .sort a { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 var(--s2); color: var(--ink-dim); text-decoration: none; border: 1px solid transparent; border-radius: var(--r-s); } & .sort a:hover { color: var(--ink-hi); background: var(--bg-raised); } & .sort a[aria-current="true"] { color: var(--ink-hi); background: var(--bg-raised); border-color: var(--border-strong); } } .repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; & .repo { position: relative; display: flex; flex-direction: column; gap: var(--s2); min-width: 0; padding: var(--s4); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); } & .repo:hover { background: var(--bg-raised); border-color: var(--border-strong); } & .repo[data-cursor] { background: var(--bg-raised); border-color: var(--ink-mute); box-shadow: inset 3px 0 0 var(--ink-hi); } & .repo[hidden] { display: none; } & .repo-name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) var(--s2); font-size: 17px; line-height: 26px; overflow-wrap: anywhere; } & .repo-name a { color: var(--ink-hi); text-decoration: none; } /* the whole card is the target of the name link */ & .repo-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); } & .repo-name a:focus-visible { outline: none; } & .repo-name a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 1px; } & .repo:hover .repo-name a, & .repo[data-cursor] .repo-name a { text-decoration: underline; } & .repo-name .pill { margin-left: 0; } & .repo-desc { flex: 1; color: var(--ink-dim); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } & .repo-desc.mute { color: var(--ink-mute); font-style: italic; } & .repo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); font-size: var(--fs-s); color: var(--ink-mute); } & .repo-meta time { color: var(--ink-dim); } & .repo-branch { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); color: var(--ink-dim); } } .list.passkeys { & .c-name { width: auto; font-weight: 600; } & .c-when { width: 120px; font-size: var(--fs-s); } & .c-sync { width: 80px; font-size: var(--fs-s); } & .c-act { width: 110px; text-align: right; } } .passkey-add { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s4); & input { flex: 1; min-width: 12ch; max-width: 320px; height: 32px; padding: 0 var(--s3); background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s); } & input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; } & input::placeholder { color: var(--ink-mute); opacity: 1; } } .list.commits, .list.refs { & .c-sha { width: 96px; } & .c-who { width: 140px; } & .c-when { width: 100px; } } /* filter: a search field above a list */ .filter { position: relative; display: flex; max-width: 420px; &::before { content: ""; position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; pointer-events: none; background: var(--ink-mute); mask: url(icons/search.svg) center / contain no-repeat; } &::after { content: "/"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 600 var(--fs-xs) / 18px var(--mono); color: var(--ink-mute); padding: 0 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; pointer-events: none; } & input { flex: 1; min-width: 0; height: 36px; padding: 0 36px 0 34px; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s); } & input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; } & input::placeholder { color: var(--ink-mute); opacity: 1; } &:focus-within::after { display: none; } } /* file finder: the results replace the tree while the field has a query */ #finder { & #finder-status { padding: var(--s3) var(--s4) var(--s2); font-size: var(--fs-s); } & #finder-list { padding: 0 var(--s2) var(--s2); } } /* the Files view: the finder on top, the tree in a card under it */ .tree-find { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3); & .filter { flex: 1; max-width: none; } & .filter::before { top: 14px; left: 14px; } & .filter::after { right: 12px; } & .filter input { height: 44px; padding-left: 42px; font-size: var(--fs); background: var(--bg-surface); } } .tree-keys { flex: none; color: var(--ink-mute); font-size: var(--fs-xs); white-space: nowrap; } .tree-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; } .tree-head { display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 0 var(--s4); background: var(--bg-raised); border-bottom: 1px solid var(--border); font-size: var(--fs-s); & .tree-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-s) / 1 var(--mono); color: var(--ink-hi); } & .tree-up { flex: none; font: 600 var(--fs-s) / 1 var(--mono); color: var(--ink-dim); text-decoration: none; } & .tree-up:hover { color: var(--ink-hi); text-decoration: underline; } & .tree-count { flex: none; color: var(--ink-mute); } } .tree-card > :is(.lede, .note) { margin: var(--s3) var(--s4); } /* The tree: one flat list, a row per entry, each as deep as --depth says (files.js sets it on the rows it opens in place). A row draws, from the left: a vertical guide per level above it, the branch tick to its node, the node, its name; then size, last commit and date, which are secondary. */ ul.tree { --indent: 22px; --rowh: 32px; --guide: var(--border-strong); & > li { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1.2fr) 96px; align-items: center; min-height: var(--rowh); padding-right: var(--s4); font-size: var(--fs-s); } & > li:hover, & > li[data-cursor] { background: var(--bg-raised); } & > li[data-cursor] { box-shadow: inset 3px 0 0 var(--ink-hi); } & > li:focus-visible { outline-offset: -2px; border-radius: 0; } & .t-main { display: flex; align-items: stretch; min-width: 0; min-height: var(--rowh); padding-left: var(--s3); } & .t-twig { flex: none; width: calc(var(--depth, 0) * var(--indent)); background: repeating-linear-gradient(90deg, transparent 0 calc(var(--indent) / 2), var(--guide) calc(var(--indent) / 2) calc(var(--indent) / 2 + 1px), transparent calc(var(--indent) / 2 + 1px) var(--indent)); } & .t-node { position: relative; flex: none; width: var(--indent); } & .t-node::before, & .t-node::after { content: ""; position: absolute; } /* the branch tick, from the guide of the directory to this node */ & .t-node::before { top: 50%; left: calc(var(--indent) / -2); right: calc(50% + 6px); height: 1px; background: var(--guide); } & > li[data-depth="0"] .t-node::before { display: none; } /* an open directory continues its guide down, to its first entry */ & > li[aria-expanded="true"] .t-node { background: linear-gradient(var(--guide), var(--guide)) center bottom / 1px calc(50% - 8px) no-repeat; } /* the node: a ring for a file, a chevron for a directory (it turns down once open), a diamond for a link, a square for a submodule */ & .t-node::after { top: 50%; left: 50%; width: 7px; height: 7px; margin: -4px 0 0 -4px; background: var(--bg-surface); border: 1px solid var(--ink-mute); border-radius: 50%; } & > li:hover .t-node::after, & > li[data-cursor] .t-node::after { background: var(--bg-raised); border-color: var(--ink-hi); } & > li[data-kind="dir"] .t-node::after { width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 0; border-radius: 0; background: var(--ink-dim); mask: url(icons/chevron.svg) center / contain no-repeat; transform: rotate(-90deg); } & > li[data-kind="dir"][aria-expanded="true"] .t-node::after { transform: none; background: var(--ink-hi); } & > li[data-kind="link"] .t-node::after { border-radius: 1px; transform: rotate(45deg); } & > li[data-kind="module"] .t-node::after { border-radius: 1px; } & > li[aria-busy="true"] .t-node { opacity: .4; } & .t-name { align-self: center; min-width: 0; padding: 4px var(--s1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: var(--fs); color: var(--ink); text-decoration: none; cursor: pointer; } & > li[data-kind="dir"] .t-name { font-weight: 700; color: var(--ink-hi); } & > li[data-kind="link"] .t-name, & > li[data-kind="module"] .t-name { color: var(--ink-dim); cursor: default; } & > li:hover .t-name, & > li[data-cursor] .t-name { text-decoration: underline; } & .t-size { padding-right: var(--s4); text-align: right; font: var(--fs-xs) / 1 var(--mono); color: var(--ink-mute); font-variant-numeric: tabular-nums; } & .t-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); } & .t-sub a { color: inherit; text-decoration: none; } & .t-sub a:hover { color: var(--ink-hi); text-decoration: underline; } & .t-when { text-align: right; white-space: nowrap; color: var(--ink-mute); font-size: var(--fs-xs); } & > li.tree-more { grid-template-columns: minmax(0, 1fr); } & > li.tree-more .t-name { font-size: var(--fs-s); font-weight: 400; color: var(--ink-dim); text-decoration: underline; } & > li.tree-more .t-node::after { display: none; } } @media (max-width: 900px) { ul.tree > li { grid-template-columns: minmax(0, 1fr) 64px 80px; } ul.tree .t-sub { display: none; } } @media (max-width: 720px) { .tree-keys { display: none; } ul.tree { --indent: 18px; } ul.tree > li { grid-template-columns: minmax(0, 1fr) 72px; } ul.tree .t-size { display: none; } } /* section headings inside a page */ .rule-h { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s5); font-size: var(--fs); & > :first-child { color: var(--ink-hi); } } main > .rule-h:first-child { margin-top: 0; } /* empty / 404 / error / sign in: one card in the middle */ .state { max-width: 560px; margin: var(--s7) auto 0 !important; padding: var(--s6); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); & .eyebrow { font: 700 var(--fs-s) / 1 var(--mono); color: var(--ink-mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s2); } & h1 { margin-bottom: var(--s3); } & p.dim { color: var(--ink-dim); } & .state-act { margin-top: var(--s5); } & .state-back { margin-top: var(--s5); display: flex; gap: var(--s4); font-size: var(--fs-s); } & .clone { margin-top: var(--s4); } } /* copyable shell lines */ .clone { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); min-width: 0; & .clone-line { min-width: 0; display: flex; gap: var(--s2); align-items: center; padding: var(--s1) var(--s1) var(--s1) var(--s3); background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-s); font-size: var(--fs-code); } & .clone-line > .mute { user-select: none; font-family: var(--mono); } & code { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; scrollbar-width: none; } & .copy { height: 26px; padding: 0 var(--s2); font-size: var(--fs-xs); } } }