-
Notifications
You must be signed in to change notification settings - Fork 13
docs: page chrome — capped shell, full-bleed rule, flat contents rail #905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
85a0f90
docs: cap the shell width, run the top rule edge to edge
ravisuhag aee9e25
docs: flat table of contents
ravisuhag d9c7fc6
docs: close the shell with a rule on each outer edge
ravisuhag 159b761
docs: rule on the inner edge of the contents rail
ravisuhag 5562604
docs: match the contents rail to the sidebar width
ravisuhag 0e11f2d
docs: put the shell on a secondary ground
ravisuhag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,146 +1,70 @@ | ||
| .container { | ||
| position: relative; | ||
| z-index: 10; | ||
| height: 100%; | ||
| } | ||
|
|
||
| .inner { | ||
| position: absolute; | ||
| inset: 0; | ||
| } | ||
|
|
||
| .tickContainer { | ||
| position: absolute; | ||
| right: 0; | ||
| display: grid; | ||
| width: 6rem; | ||
| align-items: center; | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| .tickLine { | ||
| height: 1px; | ||
| width: 0.5rem; | ||
| transition: all 100ms; | ||
| } | ||
|
|
||
| .tickLineBefore { | ||
| background-color: var(--rs-color-background-neutral-tertiary); | ||
| } | ||
|
|
||
| .tickLineAfter { | ||
| background-color: var(--rs-color-background-neutral-tertiary); | ||
| } | ||
|
|
||
| .tickContainer:hover .tickLine { | ||
| width: 1rem; | ||
| } | ||
|
|
||
| .tickClickable { | ||
| position: absolute; | ||
| inset-inline: 0; | ||
| height: 0.5rem; | ||
| cursor: pointer; | ||
| /* | ||
| A flat list of the page's headings, indented by heading level. Sizes come from | ||
| the docs typeset: the eyebrow uses the label layer (mono, uppercase, tracked | ||
| out) and the links use the caption size, so the rail reads as chrome rather | ||
| than competing with the prose beside it. | ||
| */ | ||
| .rail { | ||
| display: flex; | ||
| flex-direction: column; | ||
| box-sizing: border-box; | ||
| width: 100%; | ||
| max-height: 100%; | ||
| overflow-y: auto; | ||
| padding-block: var(--rs-space-9); | ||
| padding-left: var(--rs-space-7); | ||
| padding-right: var(--rs-space-5); | ||
| overscroll-behavior: contain; | ||
| scrollbar-width: none; | ||
| } | ||
|
|
||
| .headingContainer { | ||
| transition: transform 150ms; | ||
| .rail::-webkit-scrollbar { | ||
| display: none; | ||
| } | ||
|
|
||
| .headingContainer:hover { | ||
| transform: translateX(-0.125rem); | ||
| .eyebrow { | ||
| padding-bottom: var(--rs-space-3); | ||
| color: var(--rs-color-foreground-base-tertiary); | ||
| font-family: var(--rs-font-mono); | ||
| font-size: var(--docs-label-size); | ||
| line-height: var(--docs-label-leading); | ||
| letter-spacing: var(--docs-label-tracking); | ||
| font-weight: var(--docs-label-weight); | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .headingLabel { | ||
| position: absolute; | ||
| .list { | ||
| display: flex; | ||
| height: 0.75rem; | ||
| align-items: center; | ||
| font-family: var(--rs-font-mono); | ||
| font-size: var(--rs-font-size-mono-small); | ||
| line-height: var(--rs-line-height-mono-small); | ||
| color: var(--rs-color-foreground-base-primary); | ||
| text-transform: capitalize; | ||
| opacity: 0; | ||
| transition: opacity 300ms; | ||
| } | ||
| .headingLink { | ||
| color: var(--rs-color-foreground-base-primary); | ||
| text-align: right; | ||
| font-family: var(--rs-font-body); | ||
| font-size: var(--rs-font-size-mini); | ||
| font-style: normal; | ||
| font-weight: var(--rs-font-weight-regular); | ||
| line-height: var(--rs-line-height-mini); | ||
| letter-spacing: var(--rs-letter-spacing-mini); | ||
| flex-direction: column; | ||
| margin: 0; | ||
| padding: 0; | ||
| list-style: none; | ||
| } | ||
|
|
||
| .link { | ||
| display: block; | ||
| padding-block: var(--rs-space-2); | ||
| color: var(--rs-color-foreground-base-secondary); | ||
| font-size: var(--docs-caption-size); | ||
| line-height: var(--docs-caption-leading); | ||
| letter-spacing: var(--docs-caption-tracking); | ||
| text-decoration: none; | ||
| text-wrap: pretty; | ||
| } | ||
|
|
||
| .container:hover .headingLabel { | ||
| opacity: 1; | ||
| /* Entries sit under their section, sub-entries under those. */ | ||
| .link[data-depth="3"] { | ||
| padding-left: var(--rs-space-4); | ||
| } | ||
|
|
||
| @media (max-width: 640px) { | ||
| .headingLabel { | ||
| opacity: 1; | ||
| } | ||
| .link[data-depth="4"] { | ||
| padding-left: var(--rs-space-7); | ||
| } | ||
|
|
||
| .headingLink { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .headingLink:hover { | ||
| color: var(--rs-color-cobalt-600, #0066cc); | ||
| } | ||
|
|
||
| .connectingLine { | ||
| position: absolute; | ||
| right: 0; | ||
| height: 1px; | ||
| background-color: var(--rs-color-background-neutral-emphasis); | ||
| } | ||
|
|
||
| .scrollMarkerContainer { | ||
| position: absolute; | ||
| right: 0; | ||
| z-index: 20; | ||
| transition: opacity 300ms; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .scrollMarkerContainerReady { | ||
| opacity: 1; | ||
| } | ||
|
|
||
| .scrollMarkerContainerNotReady { | ||
| opacity: 0; | ||
| } | ||
|
|
||
| .scrollMarkerLine { | ||
| height: 1px; | ||
| width: 1rem; | ||
| background-color: var(--rs-color-cobalt-600, #0066cc); | ||
| } | ||
|
|
||
| .scrollMarkerText { | ||
| position: absolute; | ||
| top: 0; | ||
| left: -2.5rem; | ||
| transform: translateY(-50%); | ||
| font-family: var(--rs-font-mono); | ||
| font-size: var(--rs-font-size-mono-small); | ||
| line-height: var(--rs-line-height-mono-small); | ||
| color: var(--rs-color-cobalt-600, #0066cc); | ||
| transition: opacity 300ms; | ||
| } | ||
|
|
||
| .container:hover .scrollMarkerText { | ||
| opacity: 0; | ||
| .link:hover { | ||
| color: var(--rs-color-foreground-base-primary); | ||
| } | ||
|
|
||
| @media (max-width: 640px) { | ||
| .scrollMarkerText { | ||
| opacity: 0; | ||
| } | ||
| .linkActive { | ||
| color: var(--rs-color-foreground-base-primary); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Separate the 50px navbar boundary from the 64px heading threshold.
DocsNavbaris 50px high, buttoc.tsxmarks headings active whengetBoundingClientRect().top <= NAV_OFFSET. This can mark a heading active up to 14px before it reaches the navbar. If the 14px buffer is intentional, renameNAV_OFFSETand document it as50px + 14px; otherwise set it to50px. A CSS custom property cannot be used directly in this TypeScript comparison.🤖 Prompt for AI Agents