Feat/improve ux nav menu#13483
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the sidebar styling to highlight active navigation links and increases the indentation of nested lists. The review feedback points out a visual hover bug, layout shift, and browser compatibility issues introduced by using :has() on the container, suggesting styling the anchor tag directly instead. Additionally, it recommends replacing margin-left with margin-inline-start to ensure proper RTL layout support.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Anderson-Andre-P
left a comment
There was a problem hiding this comment.
Fixed. Moved background, border, and padding directly to the a tag, removing the :has() block. Added padding-inline-start: calc(0.4rem - 3px) to compensate for the border width and keep text aligned with inactive items.
|
Staged preview of the updated docs.flutter.dev site (updated for commit cecabaa): https://flutter-docs-prod--docs-pr13483-feat-improve-ux-nav-me-k8f9yxi4.web.app |
|
Staged preview of the updated flutter.dev site (updated for commit cecabaa): https://flutter-dev-230821--www-pr13483-feat-improve-ux-nav-me-m9xdw2gd.web.app |
Improves the sidebar navigation UX with two visual changes:
hierarchy hard to read. Increased from 0.675rem to 1.75rem for clearer visual nesting.
was hard to notice. The li containing the current page now receives a light blue background (color-mix with the site
primary color at 12% opacity) and a 3px solid blue left border, making it immediately clear which page the user is
on.
Both changes use existing CSS variables (--site-primary-color) to respect light and dark mode automatically.
Issues fixed by this PR (if any):
None.
PRs or commits this PR depends on (if any):
None.