diff --git a/docs/app/global.css b/docs/app/global.css index 1b681fd0..7b9cc9c0 100644 --- a/docs/app/global.css +++ b/docs/app/global.css @@ -194,8 +194,10 @@ th { } /* Section folder trigger — uppercase tracked label - Fumadocs 15 uses div[data-state] > button[data-state] for collapsible sections */ -#nd-sidebar div[data-state] > button[data-state] { + Fumadocs 15 section wrappers are bare
(no class, no id); + content panels and other Radix collapsibles always carry a class attribute, + so :not([class]) tightly scopes these rules to section triggers only. */ +#nd-sidebar div[data-state]:not([class]) > button[data-state] { font-family: var(--font-display), var(--font-sans), sans-serif !important; font-size: 11px !important; font-weight: 600 !important; @@ -203,7 +205,7 @@ th { text-transform: uppercase !important; color: var(--color-fd-muted-foreground) !important; padding: 14px 12px 8px !important; - margin-top: 8px; + margin-top: 8px !important; border-top: 1px solid var(--color-fd-border); width: 100%; display: flex; @@ -215,19 +217,25 @@ th { transition: color 0.15s ease; } -#nd-sidebar div[data-state] > button[data-state]:hover { +#nd-sidebar div[data-state]:not([class]) > button[data-state]:hover { color: var(--color-fd-foreground) !important; } +#nd-sidebar div[data-state]:not([class]) > button[data-state]:focus-visible { + outline: 2px solid var(--color-fd-primary); + outline-offset: 2px; + border-radius: 4px; +} + /* Remove top border from the first section in the sidebar */ -#nd-sidebar div[data-state]:first-child > button[data-state] { +#nd-sidebar div[data-state]:not([class]):first-child > button[data-state] { border-top: none; - margin-top: 0; + margin-top: 0 !important; padding-top: 4px !important; } /* Chevron rotation on toggle */ -#nd-sidebar div[data-state] > button[data-state] svg { +#nd-sidebar div[data-state]:not([class]) > button[data-state] svg { transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); opacity: 0.7; } @@ -254,6 +262,12 @@ th { font-weight: 500; } +#nd-sidebar a[data-active]:focus-visible { + outline: 2px solid var(--color-fd-primary); + outline-offset: 2px; + border-radius: 6px; +} + .dark #nd-sidebar a[data-active="true"] { background: color-mix(in oklch, var(--color-fd-primary) 12%, transparent) !important; }