-
Notifications
You must be signed in to change notification settings - Fork 258
fix: improve mobile responsiveness across documentation site (#2998) #734
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ export const Community = () => { | |||||
| Are you curious, 🤔 or do you have questions burning in your mind? 🔥 | ||||||
| Look no further! Join our lively Community Forum where you can: | ||||||
| </p> | ||||||
| <ul className="grid list-none gap-6 sm:grid-cols-2 xl:gap-8"> | ||||||
| <ul className="grid list-none gap-4 sm:grid-cols-2 sm:gap-6 xl:gap-8"> | ||||||
| {/*<li>*/} | ||||||
| {/* <a*/} | ||||||
| {/* href="https://community.keploy.io/"*/} | ||||||
|
|
@@ -42,12 +42,12 @@ export const Community = () => { | |||||
| <li> | ||||||
| <a | ||||||
| href="https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg" | ||||||
| className="flex items-start space-x-4" | ||||||
| className="flex items-start space-x-3 sm:space-x-4" | ||||||
| > | ||||||
| <svg | ||||||
| fill="currentColor" | ||||||
| // Hotfix: add viewBox to prevent icon from being cut off after tailwind preflight disabled | ||||||
| className="h-12 w-12 flex-none text-red-500 " | ||||||
| className="h-10 w-10 sm:h-12 sm:w-12 flex-none text-red-500" | ||||||
| viewBox="0 0 48 48" | ||||||
|
||||||
| viewBox="0 0 48 48" | |
| viewBox="0 0 48 48" |
Copilot
AI
Dec 17, 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.
Trailing whitespace should be removed at the end of the className for consistency and cleaner code.
Copilot
AI
Dec 17, 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.
The viewBox attribute contains extra spaces ("0 0 48 48" should be "0 0 48 48"). While this may not cause issues, it's inconsistent with standard SVG formatting and could be confusing.
| viewBox="0 0 48 48" | |
| viewBox="0 0 48 48" |
Copilot
AI
Dec 17, 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.
The attribute should use "className" instead of "class" in JSX. While this change was made to improve responsive sizing, the original attribute name should be corrected for proper React/JSX syntax.
| class="h-10 w-10 sm:h-12 sm:w-12 flex-none" | |
| className="h-10 w-10 sm:h-12 sm:w-12 flex-none" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ import useBaseUrl from "@docusaurus/useBaseUrl"; | |
| function UTG() { | ||
| return ( | ||
| <div className="rounded-lg"> | ||
| <ul className="grid auto-cols-[300px] grid-flow-col gap-3 lg:gap-5"> | ||
| <ul className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 lg:gap-5"> | ||
| <li className="mt-5 flex flex-col space-y-3 text-lg"> | ||
| <Link | ||
| className="text-foreground-light flex-grow text-sm" | ||
|
|
@@ -247,7 +247,7 @@ export const Products = () => { | |
| workflow: | ||
| </p> | ||
|
|
||
| <div className="grid gap-4 sm:grid-cols-3 xl:gap-6"> | ||
| <div className="grid gap-4 grid-cols-1 sm:grid-cols-3 xl:gap-6"> | ||
|
||
| <UTG /> | ||
| </div> | ||
| </section> | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -873,4 +873,210 @@ textarea { | |||||||||||||||||||||
| background-color: #e67643 !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Mobile Responsive Styles */ | ||||||||||||||||||||||
| @media screen and (max-width: 768px) { | ||||||||||||||||||||||
| /* Mobile-specific font size adjustments */ | ||||||||||||||||||||||
| :root { | ||||||||||||||||||||||
| font-size: 16px; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Ensure proper text wrapping on mobile */ | ||||||||||||||||||||||
| h1 { | ||||||||||||||||||||||
| font-size: 1.75rem !important; | ||||||||||||||||||||||
| line-height: 1.2; | ||||||||||||||||||||||
| word-wrap: break-word; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| h2 { | ||||||||||||||||||||||
| font-size: 1.5rem !important; | ||||||||||||||||||||||
| line-height: 1.3; | ||||||||||||||||||||||
| word-wrap: break-word; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| h3 { | ||||||||||||||||||||||
| font-size: 1.25rem !important; | ||||||||||||||||||||||
| line-height: 1.4; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Mobile padding and margin adjustments */ | ||||||||||||||||||||||
| .main { | ||||||||||||||||||||||
| padding: 0.5rem !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| main { | ||||||||||||||||||||||
| padding: 1rem !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Improve navbar spacing on mobile */ | ||||||||||||||||||||||
| .navbar__inner { | ||||||||||||||||||||||
| padding: 0.5rem 1rem !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .navbar__items--right { | ||||||||||||||||||||||
| gap: 8px; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .navbar__items--right > :last-child { | ||||||||||||||||||||||
| padding-right: 0; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix sidebar width on mobile */ | ||||||||||||||||||||||
| .docs-wrapper aside { | ||||||||||||||||||||||
| width: 100% !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Ensure images are responsive */ | ||||||||||||||||||||||
| img { | ||||||||||||||||||||||
| max-width: 100%; | ||||||||||||||||||||||
| height: auto; | ||||||||||||||||||||||
|
Comment on lines
+929
to
+931
|
||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix table overflow on mobile */ | ||||||||||||||||||||||
| table { | ||||||||||||||||||||||
| display: block; | ||||||||||||||||||||||
| overflow-x: auto; | ||||||||||||||||||||||
| white-space: nowrap; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Improve code block readability on mobile */ | ||||||||||||||||||||||
| pre { | ||||||||||||||||||||||
| font-size: 0.85rem; | ||||||||||||||||||||||
| overflow-x: auto; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix pagination on mobile */ | ||||||||||||||||||||||
| .pagination-nav { | ||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||
| gap: 1rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .pagination-nav__item { | ||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Ensure cards stack properly on mobile */ | ||||||||||||||||||||||
| .card { | ||||||||||||||||||||||
| margin-bottom: 1rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix button sizing on mobile */ | ||||||||||||||||||||||
| .button { | ||||||||||||||||||||||
| padding: 0.5rem 1rem; | ||||||||||||||||||||||
| font-size: 0.9rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Improve footer spacing on mobile */ | ||||||||||||||||||||||
| footer { | ||||||||||||||||||||||
| padding: 1rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .footer__links { | ||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||
| align-items: flex-start; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix search button on mobile */ | ||||||||||||||||||||||
| .DocSearch-Button { | ||||||||||||||||||||||
| padding: 0.5rem !important; | ||||||||||||||||||||||
| font-size: 0.9rem !important; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Improve TOC on mobile */ | ||||||||||||||||||||||
| .table-of-contents { | ||||||||||||||||||||||
| padding-top: 1rem; | ||||||||||||||||||||||
| font-size: 0.9rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix announcement bar on mobile */ | ||||||||||||||||||||||
| div[class^="announcementBar_"] { | ||||||||||||||||||||||
| font-size: 0.85rem; | ||||||||||||||||||||||
| padding: 0.5rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Ensure prose content is readable on mobile */ | ||||||||||||||||||||||
| .prose { | ||||||||||||||||||||||
| font-size: 1rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| .prose p { | ||||||||||||||||||||||
| margin-bottom: 1rem; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* Fix community links spacing on mobile */ | ||||||||||||||||||||||
| section ul { | ||||||||||||||||||||||
| padding-left: 0; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| section li { | ||||||||||||||||||||||
|
Comment on lines
+1006
to
+1010
|
||||||||||||||||||||||
| section ul { | |
| padding-left: 0; | |
| } | |
| section li { | |
| section > ul { | |
| padding-left: 0; | |
| } | |
| section > ul > li { |
Copilot
AI
Dec 17, 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.
The selector div[class*="rounded-lg"] is very broad and will match any div with "rounded-lg" anywhere in its class string, potentially affecting many unintended elements across the site. This could override padding for elements that need different spacing. Consider using a more specific selector or a dedicated class.
| div[class*="rounded-lg"] { | |
| .rounded-lg { |
Copilot
AI
Dec 17, 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.
This rule applies to all SVG elements globally on small screens, which could unintentionally affect icons that need specific dimensions to maintain proper aspect ratios or visual alignment. Consider using a more specific selector like '.card svg' or a utility class to target only content images rather than all SVG elements including icons in navigation or UI components.
| /* Fix icon sizing on small screens */ | |
| svg { | |
| /* Fix SVG sizing for content images on small screens */ | |
| .card svg, | |
| div[class*="rounded-lg"] svg { |
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.
Trailing whitespace should be removed at the end of the className for consistency and cleaner code.