diff --git a/src/app.css b/src/app.css index 1738a3e43..90ad8d978 100644 --- a/src/app.css +++ b/src/app.css @@ -19,10 +19,23 @@ body { margin-inline-start: 0.53125rem; } -#nd-toc > div > div > a > svg { +#nd-toc > div > div > a > svg, +#nd-toc > div > div > div.absolute { display: none; } +/* Keep every active segment on one x-axis, even when labels are indented. */ +#nd-toc > div > div > a[data-active="true"]::before { + content: ""; + position: absolute; + inset-block: -0.375rem; + inset-inline-start: 0.5rem; + width: 1px; + background: var(--color-fd-primary); + border-radius: 0; + z-index: 1; +} + /* Mintlify-style section labels: headings, not expandable folder controls. */ #nd-sidebar p.inline-flex.items-center.gap-2 { margin-block: 1.15rem 0.35rem; diff --git a/tests/fumapress-static-build.test.mjs b/tests/fumapress-static-build.test.mjs index f41a4e829..19d1aa375 100644 --- a/tests/fumapress-static-build.test.mjs +++ b/tests/fumapress-static-build.test.mjs @@ -13,6 +13,10 @@ test("the documentation keeps a neutral base with custom section and TOC treatme assert.doesNotMatch(css, /fumadocs-ui\/css\/ocean\.css/); assert.match(css, /#nd-toc > div > div/); assert.match(css, /#nd-toc > div > div > a > svg/); + assert.match(css, /#nd-toc > div > div > div\.absolute/); + assert.match(css, /a\[data-active="true"\]::before/); + assert.match(css, /inset-inline-start: 0\.5rem/); + assert.match(css, /border-radius: 0/); }); async function collectHtmlRoutes(directory) {