Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion app/pages/package/[...package].vue
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ defineOgImageComponent('Package', {

<div class="area-sidebar">
<!-- Sidebar -->
<div class="sticky top-34 space-y-6 sm:space-y-8 min-w-0 overflow-hidden xl:(top-22 pt-2)">
<div class="sidebar-scroll sticky top-34 space-y-6 sm:space-y-8 min-w-0 xl:(top-22 pt-2)">
<!-- Maintainers (with admin actions when connected) -->
<PackageMaintainers :package-name="pkg.name" :maintainers="pkg.maintainers" />

Expand Down Expand Up @@ -1159,6 +1159,58 @@ defineOgImageComponent('Package', {
grid-area: sidebar;
}
/* Keep sidebar scrollable inside viewport when hovered/focused. */
.sidebar-scroll {
overflow-y: auto;
padding-right: 10px;
}
.sidebar-scroll:hover {
padding-right: 2px;
}
@media (min-width: 1024px) {
.sidebar-scroll {
max-height: calc(100dvh - 8.5rem);
overscroll-behavior: contain;
scrollbar-gutter: stable;
scrollbar-width: none;
}
.sidebar-scroll::-webkit-scrollbar {
width: 0;
height: 0;
}
.sidebar-scroll:hover,
.sidebar-scroll:focus-within {
scrollbar-width: auto;
}
.sidebar-scroll:hover::-webkit-scrollbar,
.sidebar-scroll:focus-within::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.sidebar-scroll:hover::-webkit-scrollbar-thumb,
.sidebar-scroll:focus-within::-webkit-scrollbar-thumb {
background-color: #cecece;
border-radius: 9999px;
}
.sidebar-scroll:hover::-webkit-scrollbar-track,
.sidebar-scroll:focus-within::-webkit-scrollbar-track {
background: transparent;
}
}
@media (min-width: 1280px) {
.sidebar-scroll {
max-height: calc(100dvh - 6rem);
Copy link
Contributor

@alexdln alexdln Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image (In the screenshot on the right there is a small empty black zone under the sidebar panel)

imo It's better to make something like a global variable --header-height: 3.75rem, use it as the height of the header, and calculate the dimensions dynamically from it here.

}
}
/* Improve package name wrapping for narrow screens */
.area-header h1 {
overflow-wrap: anywhere;
Expand Down
Loading