Repository navigation
fix(ui): sidebar active fill overshoot, text shift, sticky TOC and token rhythm - #306
Merged
Merged
Conversation
…ken rhythm Sidebar - `side-indent` was 17px (margin 8 + padding 8 + border 1) while an active row keeps its own padding, so the fill landed 8px past the dashed guide. Corrected to 9px (margin + border) in both themes. - The active fill's negative margin also dragged the label 9px left. Pay it back with `padding-left: calc(space-md + side-indent-num)` so the two cancel for the text while the background still reaches the guide. Verified 0px text shift at root, depth-1 and depth-2 with height held at 48px. - Hover already used inset `box-shadow` and never moved text; left as is. TOC - `c_euv_doc_layout` inherited `flex-shrink: 1` as a flex item of the scroll container's column, so it was clamped to its `min-height: 100%` floor (824px) despite 12780px of content. A sticky descendant can only travel inside its containing block, so the TOC unpinned after one viewport. `flex-shrink: 0` restores the full sticky range. - Pin the column at `padding-main-top` instead of a bare `0` so it keeps the same breathing room below the container edge as the article. - Active entries bold at 700; hover no longer bolds (the docs override set `font-weight: 700` on `:hover` in both light and dark). Markdown rhythm - Replace em-based heading/block margins with `space-sm` / `gap-component` so article copy sits on the same token scale as the rest of the UI. Article spacing measured 16px against the example's 8px. Links - `.md-body a` restyled itself on hover (dashed -> solid, accent colour). One static treatment for both states. Padding - Delete the `padding-main-bottom` token and both usages in `c_app_main` rather than zeroing it. Verified against a local docs build: cargo fmt --check clean, clippy 0 warnings, full test suite passing.
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.
Summary
Fixes five defects in the docs shell, all verified against a local build of the docs site.
Sidebar
side-indentwas17px(margin 8 + padding 8 + border 1), but an active row keeps its own padding, so the fill landed 8px past the dashed guide. Corrected to9px(margin + border) in both themes.padding-left: calc(space-md + side-indent-num)— the two cancel for the text while the background still reaches the guide. Measured 0px text shift at root, depth-1 and depth-2, with row height held at 48px in all states.box-shadowand never moved text; left as is.TOC
c_euv_doc_layoutinheritedflex-shrink: 1as a flex item of the scroll container's column. It was therefore clamped to itsmin-height: 100%floor (824px) despite 12780px of content, and a sticky descendant can only travel inside its containing block — so the TOC unpinned after roughly one viewport of scroll.flex-shrink: 0restores the full range; verified pinned at a constant 100px offset through 11000px of scroll.padding-main-toprather than a bare0, so it keeps the same breathing room below the container edge as the article.font-weight: 700on:hoverin both light and dark — that contradicted the rule and is corrected.Markdown rhythm
space-sm/gap-component, so article copy sits on the same token scale as the rest of the UI. Article spacing measured 16px against the example's 8px; now a uniform 8px.Links
.md-body arestyled itself on hover (dashed → solid underline, accent colour). Now one static treatment for both states.Padding
padding-main-bottomtoken and both usages inc_app_mainrather than zeroing it.Verification
cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets— 0 warningscargo test --workspace --all-features— all suites passingVersion bumped to 0.28.20 with workspace path-dep pins realigned, since the sync workflows skip on PRs.
Notes
The docs deploy workflow is failing independently of this change —
Install euv-clifails to compileeuv-cli v0.28.15withcannot find value NO_CACHE_NO_STORE_MUST_REVALIDATE. That blocks any docs deploy, before and after this PR, and is not addressed here.