Skip to content

Commit

Permalink
fix: add right sidebar scrollbar (withastro#1746)
Browse files Browse the repository at this point in the history
  • Loading branch information
techfg committed Apr 19, 2024
1 parent 4162424 commit ec42ec3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/starlight/components/PageSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import TableOfContents from 'virtual:starlight/components/TableOfContents';
) * 0.25 /* MAGIC NUMBER 🥲 */
)
);
width: auto;
}
}
</style>
14 changes: 7 additions & 7 deletions packages/starlight/components/TwoColumnContent.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import type { Props } from '../props';
}

.right-sidebar {
position: fixed;
top: 0;
position: sticky;
top: var(--sl-nav-height);
border-inline-start: 1px solid var(--sl-color-gray-6);
padding-top: var(--sl-nav-height);
width: 100%;
height: 100vh;
overflow-y: auto;
scrollbar-width: none;
max-width: var(--sl-sidebar-width);
width: auto;
height: calc(100vh - var(--sl-nav-height));
overflow-y: auto;
margin-right: var(--sl-sidebar-pad-x);
}

.main-pane {
Expand Down

0 comments on commit ec42ec3

Please sign in to comment.