Skip to content
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

fix: add sidebar scroll #521

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion frontend/components/NavOverflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ for (let i = 0; i < navItemsEl.children.length; i++) {
}

const active = navItemsEl.querySelector("[data-active]");
console.log(active, navItems.get(active));

function updateNavItems() {
const navWidth = navItemsEl.parentElement.offsetWidth;
Expand Down
4 changes: 2 additions & 2 deletions frontend/routes/package/(_components)/Docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function DocsView(
)}
</div>
{docs.toc && (
<div class="max-lg:row-start-1 lg:col-[span_1_/_-1] lg:top-0 lg:sticky lg:max-h-screen box-border space-y-4 -mt-4 pt-4">
<div class="max-lg:row-start-1 lg:col-[span_1_/_-1] lg:top-0 lg:sticky lg:max-h-screen flex flex-col box-border gap-y-4 -mt-4 pt-4">
{!docs.breadcrumbs && (
<LocalSymbolSearch
scope={params.scope}
Expand All @@ -98,7 +98,7 @@ export function DocsView(
)}

<div
class="ddoc w-full lg:*:max-h-[calc(100vh-55px)] b-0"
class="ddoc w-full overflow-scroll pb-4"
dangerouslySetInnerHTML={{ __html: docs.toc }}
/>
</div>
Expand Down
4 changes: 4 additions & 0 deletions frontend/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ body .ddoc .toc {
}
}

body .ddoc:has(.toc) {
scrollbar-width: thin;
}

/* These might seem redundant but Tailwind won't always load them in the compiled stylesheet unless they're explicitly included here. */
.score-ring-red {
@apply bg-red-500;
Expand Down
Loading