File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,12 @@ export function SidebarRouteTree({
148148 { index !== 0 && (
149149 < li
150150 role = "separator"
151- className = "mt-4 mb-2 ml -5 xs:mx-5 border-b border-border dark:border-border-dark"
151+ className = "mt-4 mb-2 mx -5 sm:mr-0 border-b border-border dark:border-border-dark"
152152 />
153153 ) }
154154 < h3
155155 className = { cn (
156- 'mb-1 text-sm font-bold ml -5 xs:mx-5 text-tertiary dark:text-tertiary-dark' ,
156+ 'mb-1 text-sm font-bold mx -5 sm:mr-0 text-tertiary dark:text-tertiary-dark' ,
157157 index !== 0 && 'mt-2'
158158 ) } >
159159 { sectionHeader }
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export default function SidebarNav({
3131
3232 return (
3333 < div className = { cn ( 'sticky top-0 lg:bottom-0 lg:h-screen flex flex-col' ) } >
34- < div className = "overflow-y-scroll no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark" >
34+ < div className = "overflow-y-overlay no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark" >
3535 < aside
3636 className = { cn (
3737 `lg:grow lg:flex flex-col w-full pb-8 lg:pb-0 lg:max-w-xs z-10 hidden lg:block`
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ export default function TopNav({
290290 { isOpen && (
291291 < div
292292 ref = { scrollParentRef }
293- className = "overflow-y-scroll no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark" >
293+ className = "overflow-y-overlay no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark" >
294294 < aside
295295 className = { cn (
296296 `lg:grow lg:flex flex-col w-full pb-8 lg:pb-0 lg:max-w-xs z-50` ,
@@ -302,7 +302,7 @@ export default function TopNav({
302302 className = "w-full lg:h-auto grow pr-0 lg:pr-5 pt-4 lg:py-6 md:pt-4 lg:pt-4 scrolling-touch scrolling-gpu" >
303303 { /* No fallback UI so need to be careful not to suspend directly inside. */ }
304304 < Suspense fallback = { null } >
305- < div className = "pl-3 xs:px-5 xs:gap-0.5 xs:text-base flex flex-row lg:hidden text-base font-bold text-secondary dark:text-secondary-dark" >
305+ < div className = "px-5 sm: pl-3 sm:pr-0 xs:gap-0.5 xs:text-base flex flex-row lg:hidden text-base font-bold text-secondary dark:text-secondary-dark" >
306306 < NavItem isActive = { section === 'learn' } url = "/learn" >
307307 Learn
308308 </ NavItem >
@@ -322,7 +322,7 @@ export default function TopNav({
322322 </ div >
323323 < div
324324 role = "separator"
325- className = "ml -5 xs:mx-5 mt-4 mb-2 border-b border-border dark:border-border-dark"
325+ className = "mx -5 sm:mr-0 mt-4 mb-2 border-b border-border dark:border-border-dark"
326326 />
327327 < SidebarRouteTree
328328 // Don't share state between the desktop and mobile versions.
Original file line number Diff line number Diff line change 224224 html .dark .no-bg-scrollbar ::-webkit-scrollbar-thumb : active {
225225 background-color : rgba (255 , 255 , 255 , 0.35 ) !important ;
226226 }
227+
228+ /*
229+ * 'overlay' is a deprecated value, but works with the .no-bg-scrollbar solution
230+ * so the scrollbar width doesn't offset the containing element's width.
231+ * We can go back to using 'scroll' when .no-bg-scrollbar is no longer needed.
232+ */
233+ html .overflow-y-overlay {
234+ overflow-y : scroll; /* For Firefox. */
235+ overflow-y : overlay; /* For WebKit-based browsers. */
236+ }
227237}
228238
229239.code-step * {
You can’t perform that action at this time.
0 commit comments