Skip to content

Commit 06c812b

Browse files
committed
fix(docs): mobile nav scroll + nested-group alignment
- Force overflow-y:auto on the drawer scrollwrap. Material only flips it to auto mid-open; our layout overrides bypassed that, so a tall nav was stuck (overflow:hidden) and couldn't scroll. - Fix "Failover & retry" double-indent: the sub-group's .md-nav__container (which carries .md-nav__link) was picking up both the flat-indent rule and the desktop 22px depth rule, then the inner <a> added its own 0.9rem — pushing the label ~22px past its siblings. Zero the container's left padding with a depth-matched selector so only the inner <a>'s indent counts; the row now aligns with every other leaf.
1 parent 011abd4 commit 06c812b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎docs/stylesheets/extra.css‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,11 @@ html { scroll-padding-top: 96px; }
804804
padding: 0.5rem 0.75rem 1.5rem;
805805
margin: 0;
806806
width: 100%;
807+
/* Material only flips this to auto while the drawer is mid-open; our layout
808+
overrides bypass that, leaving it hidden so a tall nav can't scroll.
809+
Force it on. */
810+
overflow-y: auto !important;
811+
-webkit-overflow-scrolling: touch;
807812
}
808813
/* Material gives the inner a large right padding (~130px) to reserve room for
809814
the drilldown's slid-in panel. With the drilldown flattened, that padding
@@ -933,6 +938,16 @@ html { scroll-padding-top: 96px; }
933938
> .md-nav > .md-nav__list > .md-nav__item > .md-nav__container > a.md-nav__link {
934939
padding-left: 0.9rem !important;
935940
}
941+
/* A nested sub-group row is a .md-nav__container (carries .md-nav__link) — the
942+
flat-indent rule above + the desktop 22px depth rule both target it, then the
943+
inner <a> adds its own 0.9rem, double-indenting the label. The container is
944+
just the indent track; zero its padding so only the inner <a>'s 0.9rem counts
945+
and the label aligns with every sibling row. Specificity (0,8,1 via the depth
946+
chain + .md-nav__container) beats both. */
947+
.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--section
948+
> .md-nav > .md-nav__list > .md-nav__item > .md-nav__container.md-nav__link {
949+
padding-left: 0 !important;
950+
}
936951

937952
/* Active row: subtle brand text + light tint, no accent bar (drpc-style) */
938953
.md-sidebar--primary .md-nav__item .md-nav__link--active,
@@ -951,6 +966,7 @@ html { scroll-padding-top: 96px; }
951966
.md-sidebar--primary .md-nav .md-nav__item--nested:not(.md-nav__item--section) > .md-nav__link.md-nav__container,
952967
.md-sidebar--primary .md-nav .md-nav__item--section.md-nav__item--nested > .md-nav__link.md-nav__container {
953968
padding: 0 !important;
969+
padding-left: 0 !important; /* beat the flat leaf-indent rule; indent lives on the inner <a> */
954970
margin: 1px 0 !important;
955971
align-items: stretch !important;
956972
border-radius: 8px;

0 commit comments

Comments
 (0)