From fbd2a0852add9cdda72724109bb5fa8724f992e5 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Tue, 17 Nov 2026 16:10:03 -0500 Subject: [PATCH] Style: drop declarations that never take effect, merge repeated blocks - The dark scheme's --curve-on repeated the light one's value. - .abstract.seed.folded .body was two rules for one selector. - The top bar's sticky declarations were a second .docbar rule (whose margin overrode the first's) and a second .view-panes .docbar rule: one rule each now. - A note set into a pane and one beside a panel share their rule. - `border: 0` on hover for buttons that already have no border, and the pages layout's padding-bottom for a split column's pane, which the general .col.split rule already gives. The CSS coverage of a full e2e run, and every class and data attribute checked against the TSX, found no rule that nothing can match. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab --- src/ui/style.css | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src/ui/style.css b/src/ui/style.css index ec745bf..2dfb39c 100644 --- a/src/ui/style.css +++ b/src/ui/style.css @@ -99,8 +99,7 @@ article { width: min(100%, var(--col)); } } .abstract.seed.folded { cursor: pointer; border-bottom-style: dashed; margin-bottom: 0.3rem; } -.abstract.seed.folded .body { max-height: 6.1em; overflow: hidden; } -.abstract.seed.folded .body { -webkit-mask-image: linear-gradient(#000 35%, transparent 96%); mask-image: linear-gradient(#000 35%, transparent 96%); } +.abstract.seed.folded .body { max-height: 6.1em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 35%, transparent 96%); mask-image: linear-gradient(#000 35%, transparent 96%); } .unfold { font-family: var(--sans); font-size: 0.64rem; color: var(--faint); margin-bottom: 1.5rem; letter-spacing: 0.02em; } /* ---- prose ---- */ @@ -167,7 +166,7 @@ article { width: min(100%, var(--col)); } :root { --page-w: calc(var(--col) + 40px); } .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); } } -.with-panel .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); } +.with-panel .sidenote, .pane .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); } /* Text arriving. */ .caret { display: inline-block; width: 0.45em; height: 1em; vertical-align: -0.15em; background: var(--faint); animation: blink 1s steps(2) infinite; } @@ -367,7 +366,6 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid --pane-rule: #3a3a3a; --edge-strong: #a8a8a8; --curve: rgb(255 255 255 / 0.16); - --curve-on: color-mix(in srgb, var(--link) 62%, transparent); } } .view-panes .page { @@ -589,8 +587,7 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid /* The first pane keeps the page title, set from the left so it stays readable when the pane is partly covered. */ .pane.root .top h1, .pane.root .byline { text-align: left; } -/* A pane has no margin: notes are set into its column, as on a narrow screen. */ -.pane .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); } +/* A pane has no margin: notes are set into its column, as on a narrow screen (above). */ .pane .sidenote.focused { border-left: 2px solid var(--fg); } /* ---- end panes view ---- */ @@ -598,14 +595,19 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid * The bar sits in the page's top margin: the library's name, and whether the server has every * edit yet; undo, redo and the menu on the right. */ -.docbar { display: flex; align-items: baseline; gap: 0.9em; width: min(100%, var(--col)); margin: -30px 0 16px; min-width: 0; font-family: var(--sans); font-size: 0.66rem; color: var(--faint); letter-spacing: 0.02em; } +.docbar { + display: flex; align-items: baseline; gap: 0.9em; width: min(100%, var(--col)); min-width: 0; font-family: var(--sans); font-size: 0.66rem; color: var(--faint); letter-spacing: 0.02em; + /* It stays at the top, in the column too. */ + position: sticky; top: 0; z-index: 4; margin: -44px 0 16px; padding: 14px 0 6px; + background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); +} /* The library's name is the button that opens the libraries panel, with the menu's chevron (turned up while the panel is open). */ .docbar .lib-name { display: inline-flex; align-items: baseline; min-width: 0; max-width: 75%; white-space: nowrap; } .lib-name .lib-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .docbar .tool .chev.up { transform: rotate(180deg); } .save-state { white-space: nowrap; } .save-state.offline, .save-state.deleted { color: var(--attn); } -.view-panes .docbar { flex: none; width: auto; margin: 0; padding: 0.3rem 0.9rem 0.25rem; border-bottom: 1px solid var(--hair); } +.view-panes .docbar { flex: none; width: auto; margin: 0; padding: 0.3rem 0.9rem 0.25rem; border-bottom: 1px solid var(--hair); position: relative; box-shadow: none; clip-path: none; background: none; } /* ---- end top bar ---- */ /* ---- links (src/ui/Links.tsx) ---- @@ -760,7 +762,7 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid cursor: pointer; white-space: nowrap; } .key kbd { font-size: 0.86em; padding: 0 0.25em; margin-right: 0.3em; border-bottom-width: 1px; color: var(--dim); } -.key:hover { background: var(--sel); border: 0; } +.key:hover { background: var(--sel); } .key:hover .lbl { text-decoration: underline 1px dotted; text-underline-offset: 0.18em; } .key:focus-visible { outline: 1px solid var(--fg); outline-offset: 1px; } .hsep { color: var(--faint); } @@ -826,7 +828,7 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid .row:hover > .more, .node.focused > .row > .more, .more[aria-expanded="true"], .more:focus-visible, .top:hover .more, .top.focused .more, :is(.sidenote, .inset):hover > .more, :is(.sidenote, .inset).focused > .more { opacity: 1; } -.more:hover, .more[aria-expanded="true"] { color: var(--fg); background: var(--sel); border: 0; } +.more:hover, .more[aria-expanded="true"] { color: var(--fg); background: var(--sel); } .row > .title + .more { margin-left: auto; } .row > .flags + .more { margin-left: 0.5em; } /* After the arrow of a row whose pane is open. */ @@ -841,13 +843,7 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid .pane-btn.more { display: flex; align-items: center; justify-content: center; padding: 0; font-family: var(--sans); font-size: 0.8rem; line-height: 1; letter-spacing: 0.04em; } .pane-btn.more[aria-expanded="true"] { color: var(--fg); background: var(--sel); } -/* The top bar stays at the top, in the column too: undo, redo when there is one, and the menu. */ -.docbar { - position: sticky; top: 0; z-index: 4; margin: -44px 0 16px; padding: 14px 0 6px; - background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); -} -.view-panes .docbar { position: relative; box-shadow: none; clip-path: none; background: none; } -/* What the keys bring into view is not left under it. */ +/* What the keys bring into view is not left under the top bar. */ html { scroll-padding-top: 48px; } .docbar .tools { margin-left: auto; display: flex; align-items: baseline; gap: 1.1em; } .docbar .tool { font: inherit; color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: 0.02em; } @@ -959,7 +955,6 @@ html { scroll-padding-top: 48px; } .panes[data-layout="pages"] .pane { border-right: 0; } /* Room above the title for the pane's buttons, a finger's size; on a tablet the text keeps its measure. */ .panes[data-layout="pages"] .pane-scroll { padding-top: 46px; } -.panes[data-layout="pages"] .col.split .pane-scroll { padding-bottom: 1.4rem; } .panes[data-layout="pages"] .pane-body { max-width: var(--pane-text); margin: 0 auto; } .panes[data-layout="pages"] .pane-ctl { top: 2px; right: 4px; gap: 0; } .panes[data-layout="pages"] .pane-btn { width: 40px; height: 40px; padding: 12px; color: var(--faint); } @@ -1044,7 +1039,6 @@ html { scroll-padding-top: 48px; } position: relative; flex: none; display: flex; align-items: center; gap: 0.3em; min-width: 44px; max-width: 11em; padding: 0 12px; font: inherit; color: var(--dim); background: none; border: 0; border-radius: 0; cursor: pointer; } -.trail-step:hover { border: 0; } @media (hover: hover) { .trail-step:hover { color: var(--fg); } } .trail-step::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px; background: var(--hue-faint); } .trail-step.here { color: var(--fg); font-weight: 600; } @@ -1079,7 +1073,6 @@ html { scroll-padding-top: 48px; } /* Each row 44 px, indented by its column (Pages.tsx sets it); its tree lines drawn in it (pages.ts rails). */ .map-row { position: relative; display: flex; align-items: stretch; height: 44px; } .map-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55em; padding: 0 8px; font: inherit; color: var(--dim); text-align: left; background: none; border: 0; border-radius: 0; cursor: pointer; } -.map-go:hover { border: 0; } @media (hover: hover) { .map-go:hover { color: var(--fg); } } /* A line into a pane in that pane's colour, fainter off the focused branch and stronger on it; over the active row's ground. */ .rail { position: absolute; z-index: 1; pointer-events: none; border: 0 solid var(--hue-faint); } @@ -1098,7 +1091,6 @@ html { scroll-padding-top: 48px; } .map-btn.none { cursor: default; } .map-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; } /* Pointed at with a mouse only: a finger leaves no hover behind on what comes under it next. */ -.map-btn:hover { border: 0; } @media (hover: hover) { .map-btn:hover { color: var(--fg); background: var(--sel); } } .map-btn.pin.on { color: var(--fg); } .map-btn.pin.on svg { fill: currentColor; }