Skip to content

Commit bf7b4d3

Browse files
devGregAclaude
andcommitted
docs: fix sidebar clipping and focus-ring artifacts
The theme bleeds .docs-links 24px past its column (margin-right: -24px), which pushed every sidebar item outside the version-menu scroll wrapper; combined with the wrapper's overflow-x clipping, long labels, Pro badges, and the active pill were cut off at the right edge. Zero the bleed inside the wrapper and add slight right padding. Also: clicked summaries keep :focus-visible in most browsers, and the clipped outline ring rendered as stray horizontal lines around collapsed groups in dark mode. Replace the ring with a filled focus state, and ease group-label letter-spacing so long edition names wrap cleanly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a6119e5 commit bf7b4d3

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

docs/assets/scss/common/_custom.scss

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,14 @@ h1, h2, h3, h4, h5, h6,
454454
.version-menu-wrapper {
455455
border-top: 1px solid var(--dd-border);
456456
padding-top: 0.75rem;
457+
padding-right: 0.375rem;
458+
459+
// The theme bleeds .docs-links 24px past its column (margin-right: -24px),
460+
// which pushed every item outside this scroll wrapper and clipped labels,
461+
// badges, and the active pill at the right edge.
462+
.docs-links {
463+
margin-right: 0;
464+
}
457465
}
458466

459467
// Both edition menus render; html[data-dd-version] (stamped before first
@@ -500,10 +508,11 @@ html:not([data-dd-version='pro']) .version-pro {
500508
> ul > li > details > summary {
501509
font-size: 0.75rem;
502510
font-weight: 600;
503-
letter-spacing: 0.09em;
511+
letter-spacing: 0.06em;
504512
text-transform: uppercase;
505513
color: var(--dd-muted);
506514
padding: 0.375rem 0;
515+
line-height: 1.5;
507516

508517
&:hover {
509518
color: var(--dd-ink);
@@ -557,6 +566,21 @@ html:not([data-dd-version='pro']) .version-pro {
557566
cursor: pointer;
558567
padding-right: 1.5rem;
559568
list-style: none;
569+
570+
// A clicked summary keeps :focus-visible in most browsers; the default
571+
// outline ring gets clipped by the sidebar's scroll wrapper and reads as
572+
// stray horizontal lines. Use a filled state instead (still obvious for
573+
// keyboard users).
574+
&:focus,
575+
&:focus-visible {
576+
outline: none;
577+
}
578+
579+
&:focus-visible {
580+
background: var(--dd-icon-tile);
581+
border-radius: 0.375rem;
582+
color: var(--dd-ink);
583+
}
560584
}
561585

562586
.section-nav details > summary::-webkit-details-marker {

0 commit comments

Comments
 (0)