fix(docs): align sidebar active-item highlight with indented label column

Merged
AN
10d ago
+71-8

Summary

Closes #7956.

On docs pages the active sidebar item's highlight pill protruded ~2.5rem (Learn sections) / ~1.5rem (Reference, Changelog) to the left of the section guide and its sibling labels, because the pill was a full-width child of the unindented link while the label and guide marker sit inside the indented flex.

The pill is moved inside the indented flex so its left edge aligns with the guide and the label column, and the label is made relative so it keeps painting above the pill (the old z-[-1] is no longer needed). The pill deliberately carries no pointer-events-none class: the Reference and Changelog callers hide the guide marker via [&_.pointer-events-none]:hidden on the flex, and a pill with that class would be hidden too.

One deliberate behavior change: the pill's right edge now ends at the flex's max-w-[14rem] cap rather than the sidebar's outer edge.

Test plan

  • New regression test test_sidebar_active_pill_stays_inside_indented_row in tests/units/reflex_site_shared/test_docs_shell.py (fails on main, passes with the change).
  • pytest tests/units/reflex_site_shared: 163 passed. ruff check / ruff format --check (pinned 0.16.4) clean.
  • Verified on the real docs app (CI=true reflex run, dev mode, Chrome 1500x900): active pills on /docs/getting-started/introduction/ (2.5rem variant) and /docs/api-reference/browser-storage/ and /docs/changelog/ (1.5rem hidden-guide variant) align with the label column, stay visible where the guide is hidden, and navigation/hover/dark-mode rendering are unchanged. Not tested: production build, non-Chrome browsers, mobile viewports.