Skip to content

Commit

Permalink
fix: Fix scroll into view in TOC (dotnet#8898)
Browse files Browse the repository at this point in the history
Add active class to list item
  • Loading branch information
MihkelAuv authored and p-kostov committed Jun 28, 2024
1 parent 58f4b67 commit b7bb0f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/modern/src/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export async function renderToc(): Promise<TocNode[]> {
const isExpanded = (tocFilter !== '' && expanded !== false && children != null) || expanded === true

return html`
<li class=${classMap({ expanded: isExpanded })}>
<li class=${classMap({ expanded: isExpanded, active: activeNodes.includes(node) })}>
${isLeaf ? null : html`<span class='expand-stub' @click=${toggleExpand}></span>`}
${dom}
${children}
Expand Down

0 comments on commit b7bb0f4

Please sign in to comment.