-
Notifications
You must be signed in to change notification settings - Fork 258
feat: enhance mobile responsiveness with viewport meta tag and CSS ad… #728
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -54,6 +54,14 @@ module.exports = { | |||||||||||||||||
| {name: "twitter:card", content: "summary_large_image"}, | ||||||||||||||||||
| ], | ||||||||||||||||||
| headTags: [ | ||||||||||||||||||
| // Viewport meta tag for mobile responsiveness | ||||||||||||||||||
| { | ||||||||||||||||||
| tagName: "meta", | ||||||||||||||||||
| attributes: { | ||||||||||||||||||
| name: "viewport", | ||||||||||||||||||
| content: "width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes", | ||||||||||||||||||
| }, | ||||||||||||||||||
| }, | ||||||||||||||||||
|
Comment on lines
+57
to
+64
|
||||||||||||||||||
| // Viewport meta tag for mobile responsiveness | |
| { | |
| tagName: "meta", | |
| attributes: { | |
| name: "viewport", | |
| content: "width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes", | |
| }, | |
| }, |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -873,4 +873,71 @@ textarea { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background-color: #e67643 !important; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* Mobile responsiveness fixes */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @media screen and (max-width: 768px) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| max-width: 100vw; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+878
to
+880
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * { | |
| max-width: 100vw; | |
| } |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an inconsistency in breakpoints between media queries. The mobile query uses max-width: 768px while the Products section mobile query uses max-width: 640px. This creates a gap (641px-768px) where the mobile fixes apply but the Products section doesn't stack vertically.
For consistency and to avoid layout issues, the breakpoints should align. Consider using the same breakpoint value (e.g., 640px or 768px) across all mobile media queries, or ensure the ranges are intentionally designed and documented.
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excessive use of !important declarations (used 16 times in this media query) can make the styles difficult to maintain and override in the future. While !important may be necessary to override Docusaurus's built-in styles in some cases, consider whether all these declarations truly need it.
A better approach would be to increase CSS specificity or identify which styles genuinely require !important to override framework defaults, and remove it from the others.
| overflow-x: hidden !important; | |
| width: 100%; | |
| max-width: 100vw; | |
| } | |
| footer, .navbar, article, main, .main-wrapper { | |
| max-width: 100vw !important; | |
| overflow-x: hidden !important; | |
| width: 100% !important; | |
| } | |
| footer { | |
| padding-left: 1rem !important; | |
| padding-right: 1rem !important; | |
| } | |
| .footer__icons { | |
| flex-wrap: wrap !important; | |
| justify-content: center !important; | |
| width: 100% !important; | |
| } | |
| .footer__copyright, .footer__link-item { | |
| width: 100% !important; | |
| text-align: center !important; | |
| } | |
| .DocSearch-Button { | |
| width: 100% !important; | |
| max-width: 200px !important; | |
| } | |
| .navbar__items { | |
| max-width: 100% !important; | |
| } | |
| .navbar__inner { | |
| padding-left: 1rem !important; | |
| padding-right: 1rem !important; | |
| } | |
| img, video, iframe, pre, table { | |
| max-width: 100% !important; | |
| } | |
| } | |
| /* Fix Products section - reduce size on tablet */ | |
| @media screen and (min-width: 641px) and (max-width: 1024px) { | |
| ul.grid-flow-col { | |
| grid-auto-columns: 220px !important; | |
| } | |
| } | |
| /* Fix Products section - stack on mobile */ | |
| @media screen and (max-width: 640px) { | |
| ul.grid-flow-col { | |
| grid-auto-flow: row !important; | |
| grid-auto-columns: unset !important; | |
| overflow-x: hidden; | |
| width: 100%; | |
| max-width: 100vw; | |
| } | |
| footer, .navbar, article, main, .main-wrapper { | |
| max-width: 100vw; | |
| overflow-x: hidden; | |
| width: 100%; | |
| } | |
| footer { | |
| padding-left: 1rem; | |
| padding-right: 1rem; | |
| } | |
| .footer__icons { | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| width: 100%; | |
| } | |
| .footer__copyright, .footer__link-item { | |
| width: 100%; | |
| text-align: center; | |
| } | |
| .DocSearch-Button { | |
| width: 100%; | |
| max-width: 200px; | |
| } | |
| .navbar__items { | |
| max-width: 100%; | |
| } | |
| .navbar__inner { | |
| padding-left: 1rem; | |
| padding-right: 1rem; | |
| } | |
| img, video, iframe, pre, table { | |
| max-width: 100%; | |
| } | |
| } | |
| /* Fix Products section - reduce size on tablet */ | |
| @media screen and (min-width: 641px) and (max-width: 1024px) { | |
| ul.grid-flow-col { | |
| grid-auto-columns: 220px; | |
| } | |
| } | |
| /* Fix Products section - stack on mobile */ | |
| @media screen and (max-width: 640px) { | |
| ul.grid-flow-col { | |
| grid-auto-flow: row; | |
| grid-auto-columns: unset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The viewport meta tag includes
maximum-scale=5.0which restricts users' ability to zoom. While this is better thanmaximum-scale=1.0, any maximum-scale restriction can create accessibility barriers for users with visual impairments who need to zoom in beyond the set limit.For better accessibility compliance with WCAG 2.1 Success Criterion 1.4.4 (Resize text), consider removing the
maximum-scaleparameter entirely to allow unrestricted zooming:"width=device-width, initial-scale=1.0, user-scalable=yes"