feat(sidebar): widen content when the toc is hidden - #50
Merged
Conversation
Hiding the toc handed its columns to dead space, so the toggle looked inert on wide terminals. The content cap now rises by the reclaimed sidebar width.
Startup benchmark (
|
| build | mean | ratio | verdict |
|---|---|---|---|
| baseline (main@daae0b5) | 707.4ms ± 15.0ms | — | |
| PR | 700.0ms ± 18.6ms | 0.99× | ✅ ok |
Thresholds: warn ≥ 1.1×, fail ≥ 1.25×. Baseline built from main.
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.
Hiding the TOC sidebar with
tnow widens the document text. Before, the freed columns became empty space, so the toggle looked inert on wide terminals.Key Changes
contentMaxForSidebaradds the sidebar width to the content max-width while the sidebar is hidden. Documents with no headings, and so no sidebar, keep the plain cap.