Skip to content

Fix mobile navbar icon overlap (search and GitHub icons) #487 #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devdattatalele
Copy link

🐛 Bug Fix: Mobile Navbar Icon Overlap

Fixes: #487

Problem

On mobile devices, the search icon was overlapping with the GitHub icon in the navbar, creating a cluttered UI and potentially affecting usability.

Solution

Added responsive CSS rules specifically targeting mobile viewports (≤996px) to:

  • Proper spacing: Added gap property to .navbar__items--right for consistent spacing
  • Icon margins: Added explicit margins to prevent overlap between navbar items
  • Search component: Optimized search button sizing and positioning
  • GitHub icon: Added specific styling for the GitHub link with proper padding
  • Small screens: Extra responsive rules for very small screens (≤576px)

Changes

  • Modified src/css/custom.css with mobile-specific CSS rules
  • Uses Docusaurus's standard breakpoint (996px) for mobile detection
  • Maintains existing desktop functionality while fixing mobile issues

Testing

The fix targets common mobile viewport sizes and should be tested on:

  • Mobile devices in portrait mode
  • Browser DevTools responsive mode
  • Various screen sizes (320px - 768px)

Technical Details

  • Uses CSS Grid gap property for reliable spacing
  • Implements nested media queries for different mobile sizes
  • Targets Docusaurus CSS class names (.navbar__items--right, .DocSearch-Button)
  • Maintains accessibility with proper padding and minimum touch targets

@Mohit5Upadhyay
Copy link

Hi @devdattatalele 👋, thanks for working on this!

Modified src/css/custom.css with mobile-specific CSS rules

It looks like the PR currently shows no file changes, so the fix for the navbar overlap may not have been pushed to this branch yet. Could you please check and push the committed changes to update the PR?

This will help reviewers -- to review changes.

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