Restyle the architecture docs site and animate the sidebar - #9527
Draft
kube wants to merge 11 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kube
force-pushed
the
claude/petrinaut-arch-docs-styling-554323
branch
from
September 3, 2026 21:02
97106d2 to
770ac44
Compare
Restate Starlight's palette and type scale as one flat monochrome system, so the chrome reads as a single surface divided by hairlines and colour is left to the things that carry meaning. Collapsing the left panel now animates: the pane hides with visibility rather than display, the content inset derives from the pane width, and every box sized from it transitions on one curve. A drag or a held arrow key already tracks its input, so the handle marks the gesture and the transitions stand aside.
The borders framing the header, the sidebar and the on-this-page column are gone, leaving the sidebar's depth guide as the only rule drawn in the chrome, where it says how deep a row sits in the tree. The search field and the compare chips now read by fill rather than by an outline, one step off the page background in either theme.
kube
force-pushed
the
claude/petrinaut-arch-docs-styling-554323
branch
from
September 3, 2026 22:29
770ac44 to
6ca3ec5
Compare
Both rails and the collapse toggle sit at 70% until the pointer or keyboard focus reaches them, over 300ms, with the whole rail as the hover target. prefers-reduced-transparency turns the effect off. A 30px band under the header blurs and tints the content passing beneath it. backdrop-filter cannot ramp on its own, so the ramp is three stacked layers of increasing radius, each masked to a shorter band, and each filtering what the one beneath it produced. Blocks now sit 1.5rem apart with 2.25em above a section heading, and body copy is 17px: Starlight defines --sl-text-body but never applies it, so the size had to be set here.
The band ran both to 30px, which hid the blur: its strongest layers sit at the top, which is exactly where the tint is opaque. The tint keeps its 30px and the blur now runs to 60px, so below the tint there is a stretch where content is blurred and still visible. Radii go up with it, 4px to 16px.
The three layers now differ by height rather than by mask alone. All are anchored under the header and run to a different depth: 60px at 1px of blur, 40px at 2px, 20px at 4px. They overlap towards the header and thin out to one at the bottom, so the tallest and weakest is the layer that meets unblurred content. Each fades out over its own lower half, so a layer ending reads as a soft edge rather than a line across the page.
The band's construction moves to a shared class so the rail and the content column build it from one set of rules. The rail scrolls independently of the page, so its band keys off the pane's own scrollTop and appears only once rows have gone up behind the header. Shown unconditionally it would sit on the first row of an unscrolled rail and dim it for nothing.
Height and opacity both come off `--pnd-nav-progress`, which the header script writes from the rail's scrollTop, 0 to 1 over the first 60px. At rest the band has no height, so it stays off the first row of an unscrolled rail. Nothing eases it: the value already tracks the scroll frame by frame, and a transition would leave the band lagging the rows it covers. The ramp is now two layers rather than three, 60px at 1px of blur and 30px at 2px, in both places the band is used.
Sixty took two rows of scrolling before the band was fully formed, so it read as arriving late. Twenty is well under one row: the band is there as soon as anything has gone up behind the header, and the ramp only takes the hard edge off its arrival.
The band is now a 60px tint under an 80px blur, with a single layer at 1px. `backdrop-filter` takes a single radius, so the ramp comes from the mask: full strength for the layer's top half, out to nothing by its bottom. The comment on the markup still described three layers, two rounds after there were three.
The content band now grows out of the window's scroll the way the nav band grows out of the rail's, so an unscrolled page has nothing laid over it. One tracker drives both, and one progress number per band carries height, tint and opacity. The content band also starts below `--sl-mobile-toc-height`. Between 50rem and 72rem Starlight moves the on-this-page column into a bar under the header, and the band was sitting on top of it.
The collapse toggle and the theme select rest at 50% rather than the rails' 70%: one small control in a wide header carries less than a column of text. A press dips the toggle and springs it back past its own size, behind `prefers-reduced-motion`. The toggle's hover and focus rules carried two selectors' worth of specificity against a base rule with three, so the button had never lit up on hover at all. Both now carry the same prefix. The GitHub link goes from the config. Starlight draws the rule beside it from `.social-icons::after`, on the container rather than a link, so the group is hidden while it holds none. The theme select's focus ring is restated in the palette's greys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Appearance of the docs site only, bundle and content untouched.
Summary
Before this PR, the architecture docs site ran on Starlight's default theme: a blue accent on the active nav row and on every prose link, a 42px page title, side panels filled in three different greys, and square code frames. Collapsing the left panel set
display: noneon the pane and swapped the content column's inset for a fixed 2rem, so the layout jumped in a single frame. The resize handle filled its whole 6px width with the accent colour on hover, wrote tolocalStorageon every pointer move, and lost its highlight as soon as the pointer left the strip mid-drag.This restyles the site on one neutral ramp, monochrome apart from what carries meaning, and animates the collapse. The pane hides with
visibilityinstead ofdisplay, the content inset derives from the pane width, and every box sized from that width transitions on one curve. A drag or a held arrow key marks itself so those transitions do not apply and the pane tracks the pointer directly.Links
Changes
Appearance
--ec-*variables Expressive Code readsSidebar motion
max(sidebar-width, 2rem)visibilityrather thandisplay: noneprefers-reduced-motionResize handle
Known issues
Next steps
Test coverage
lint:tscand the production build:How to test
Demo
Video and before/after screenshots pending, handed over for drag-drop.