Skip to content

Fix mobile styling: header overflow, chapter navigation, and bullet alignment#51

Merged
aih merged 4 commits intomainfrom
copilot/fix-mobile-styling-issues
Feb 16, 2026
Merged

Fix mobile styling: header overflow, chapter navigation, and bullet alignment#51
aih merged 4 commits intomainfrom
copilot/fix-mobile-styling-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Mobile view had three issues: chapter title overflowing into logo area, chapters list requiring extra accordion click, and misaligned bullet points.

Changes

Header Layout

  • Flex-wrap .usa-navbar on mobile to place chapter title on separate row
  • Logo and menu button remain on first row, title wraps below at full width
@media (max-width: 40em) {
  .usa-navbar {
    flex-wrap: wrap;
  }
  
  .header-chapter-title {
    order: 3;
    flex-basis: 100%;
    margin-top: 0.25rem;
  }
}

Chapter Navigation

  • Hide accordion button on mobile, auto-display chapters list with display: block !important
  • Added Previous/Next navigation component at page bottom
  • addChapterNavigation() function dynamically creates nav links based on current chapter position
function addChapterNavigation(currentFilename: string): void {
  const currentIndex = chapters.findIndex(c => c.filename === currentFilename);
  const prevChapter = currentIndex > 0 ? chapters[currentIndex - 1] : null;
  const nextChapter = currentIndex < chapters.length - 1 ? chapters[currentIndex + 1] : null;
  // Creates nav element with prev/next links
}

List Styling

  • Explicit list-style-type: disc on item elements
  • Reset padding/margin to align markers with content

Screenshots

Before: Header overlap and extra click required
Before

After: Clean header layout, chapters immediately visible
After


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 16, 2026 19:32
Co-authored-by: aih <217356+aih@users.noreply.github.com>
…oints

- Fixed header overlap on mobile by placing chapter title on its own row
- Added Previous/Next chapter navigation links at bottom of pages
- Improved bullet point alignment with explicit list-style-type
- Hide sidenav by default on mobile (shown via hamburger menu)
- Auto-expand Chapters menu on mobile (in progress)

Co-authored-by: aih <217356+aih@users.noreply.github.com>
…cordion button

- Auto-display chapters list in mobile menu without accordion button
- Chapters immediately visible without extra click
- Previous/Next navigation fully functional
- All mobile styling issues resolved

Co-authored-by: aih <217356+aih@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mobile styling and presentation issues Fix mobile styling: header overflow, chapter navigation, and bullet alignment Feb 16, 2026
Copilot AI requested a review from aih February 16, 2026 19:41
@aih aih marked this pull request as ready for review February 16, 2026 19:49
@aih aih merged commit dc57f36 into main Feb 16, 2026
1 check failed
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.

2 participants