Skip to content

fix: align widened content with header grid, sync ToC tooltip state - #52

Merged
ds-giusy merged 2 commits into
mainfrom
fix/UCD-180-sidebar-alignment
Aug 6, 2026
Merged

fix: align widened content with header grid, sync ToC tooltip state#52
ds-giusy merged 2 commits into
mainfrom
fix/UCD-180-sidebar-alignment

Conversation

@ds-giusy

@ds-giusy ds-giusy commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • .md-nav__source (mobile repo badge): fixed dark colors instead of Material's broken indigo fallback
  • .md-content divider / .md-grid width cap: scoped to >=76.25em, no longer leaking onto mobile
  • .md-content__inner: drops the 90ch reading cap once a sidebar is collapsed (UCD-180 widen feature), so text actually fills the reclaimed space
  • .md-main__inner: padding instead of a one-sided margin override, so it stays centered like the header when a sidebar collapses (previously the content area went flush left while the header stayed centered)
  • toc-collapse-toggle.js: tooltip text now syncs with the button's actual state instead of always saying "ausblenden"

Test plan

  • Toggle both sidebars (left nav / right ToC) independently and together, verify content stays aligned with the header on desktop
  • Verify no extra margin/divider appears on mobile
  • Verify the ToC toggle tooltip text matches the current state after clicking
  • Check repo badge colors in light and dark mode

- .md-nav__source: fixed dark badge colors instead of Material's broken
  indigo fallback (background-color var was never set for this theme)
- .md-content divider and .md-grid width cap: scoped to >=76.25em, they
  were leaking unwanted margin/border onto mobile
- .md-content__inner: drops the 90ch reading cap once a sidebar is
  collapsed (UCD-180 widen feature), instead of staying pinned to it
- .md-main__inner: use padding instead of a one-sided margin override so
  it still centers via margin:auto like the header, keeping both edges
  aligned when a sidebar collapses
- toc-collapse-toggle.js: sync the tooltip text with the button's actual
  state, it stayed on "ausblenden" even after the ToC was hidden
- Toggle buttons now sit outside the relevant sidebar (or outside
  .md-main__inner once collapsed) instead of straddling the divider,
  with a 20px gap from whichever edge is closer — never overlapping
  the ToC/nav's own links or the "edit this page" icon
- .md-content padding-left: 40px removed, it only existed to clear the
  old straddling button and left content not flush with the header
- .md-content__inner: max-width transitions smoothly now (was jumping
  instantly between 90ch and an unanimatable `none`), and drops the
  90ch cap whenever the ToC sidebar is actually visible, not just when
  a sidebar has been toggled
- Toggle border color: fixed an invalid `border` shorthand that silently
  dropped the "active" border, and two dark-mode selectors that combined
  data-md-color-scheme with html[data-ds-...] and could never match
  since Material sets that attribute on <body>, not <html> — both
  toggles now use the already scheme-aware var(--md-accent-fg-color)
  and render identically in light/dark, open/collapsed
@ds-giusy
ds-giusy merged commit fa9e681 into main Aug 6, 2026
3 checks passed
@ds-giusy
ds-giusy deleted the fix/UCD-180-sidebar-alignment branch August 6, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant