-
Notifications
You must be signed in to change notification settings - Fork 315
Fix WCAG 2.5.5 touch targets and lower tablet sidebar breakpoint to 768px #22891
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1635,6 +1635,39 @@ main, | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| /* === W2: Lower sidebar breakpoint to 768px for tablet support === */ | ||||||
| /* Starlight default is 50rem (800px). At 48rem (768px) the sidebar becomes persistent */ | ||||||
| /* so iPad (768×1024) and iPad Pro 11 (834×1194) show a sidebar instead of hamburger menu. */ | ||||||
| @media (min-width: 48rem) { | ||||||
| /* Offset main content to make room for the persistent sidebar */ | ||||||
| html[data-has-sidebar] { | ||||||
| --sl-content-inline-start: var(--sl-sidebar-width); | ||||||
| } | ||||||
|
|
||||||
| /* Make the sidebar pane always visible (not overlay) */ | ||||||
| .sidebar-pane { | ||||||
| --sl-sidebar-visibility: visible; | ||||||
| width: var(--sl-sidebar-width) !important; | ||||||
| background-color: var(--sl-color-bg-sidebar) !important; | ||||||
| border-inline-end: 1px solid var(--sl-color-hairline-shade) !important; | ||||||
| } | ||||||
|
|
||||||
| /* Remove the extra header padding that was reserved for the hamburger button */ | ||||||
| [data-has-sidebar] .header { | ||||||
| padding-inline-end: var(--sl-nav-pad-x) !important; | ||||||
| } | ||||||
|
|
||||||
| /* Hide the mobile hamburger toggle since the sidebar is now persistent */ | ||||||
| starlight-menu-button button { | ||||||
|
||||||
| starlight-menu-button button { | |
| html[data-has-sidebar] starlight-menu-button button { |
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.
This
.sidebar-panestyling applies to all widths >=768px and will override the existing “Only make sidebar transparent on desktop” rule (@media (min-width: 769px) { .sidebar-pane { background: transparent !important; } }earlier in this file). If the intent is only to patch the 768–799px gap in Starlight’s default breakpoint, consider scoping these overrides to that range (e.g.,min-width: 48remANDmax-width: 49.999rem/799px) or avoid overriding desktop-only appearance properties (background/border) while still forcing visibility.