fix: resolve hero section horizontal overflow on medium screens (640p…#533
fix: resolve hero section horizontal overflow on medium screens (640p…#533rishu229 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
…x-1024px) - Added overflow-hidden to Banner component container - Wrapped Pattern components in constrained container with gradient mask - Applied CSS gradient mask for smooth fade effect on patterns - Ensures no horizontal scroll between 640px-1024px viewports Fixes AOSSIE-Org#522
|
@rishu229 is attempting to deploy a commit to the AOSSIE Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe Banner component restructures its decorative patterns and content layering. Pattern elements are now wrapped in an absolute overlay with CSS gradient masking. Content elements are repositioned within a higher stacking context (z-10), addressing responsive layout overflow occurring between 640px–1024px viewports. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/components/Banner.jsx (2)
12-21: Clean implementation of the gradient mask overlay.The mask approach effectively fades the Pattern components without removing them entirely, maintaining visual appeal while preventing overflow. Good use of
pointer-events-noneto ensure the decorative overlay doesn't interfere with interactions.One minor observation: consider using Tailwind's arbitrary value syntax if you want to keep styles in the className for consistency:
className="absolute inset-0 overflow-hidden pointer-events-none [mask-image:linear-gradient(to_right,transparent_0%,black_20%,black_60%,transparent_100%)] [-webkit-mask-image:linear-gradient(to_right,transparent_0%,black_20%,black_60%,transparent_100%)]"However, the inline style approach is equally valid and arguably more readable for complex gradients.
20-20: Consider reordering visibility classes for mobile-first convention.The classes work correctly, but
invisible sm:visiblefollows Tailwind's mobile-first convention more clearly (base state first, then breakpoint overrides).♻️ Suggested reorder
- <Pattern className="absolute mt-2 -top-32 left-0 w-full sm:left-3/4 sm:top-36 sm:ml-8 sm:w-auto md:left-2/3 lg:left-auto lg:right-2 lg:ml-0 xl:right-auto xl:left-2/3 sm:visible invisible" /> + <Pattern className="invisible sm:visible absolute mt-2 -top-32 left-0 w-full sm:left-3/4 sm:top-36 sm:ml-8 sm:w-auto md:left-2/3 lg:left-auto lg:right-2 lg:ml-0 xl:right-auto xl:left-2/3" />
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Banner.jsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/Banner.jsx (2)
src/components/ContainerPattern.jsx (1)
ContainerPattern(10-12)src/components/Pattern.jsx (1)
Pattern(3-59)
🔇 Additional comments (2)
src/components/Banner.jsx (2)
8-8: LGTM –overflow-hiddencorrectly clips pattern overflow.Adding
overflow-hiddento the container addresses the root cause of horizontal scroll by clipping any Pattern elements that extend beyond the viewport on medium screens.
23-37: Proper stacking context for content visibility.Wrapping content in
relative z-10ensures text and the CTA button remain above the masked pattern overlay. This is the correct approach for maintaining content accessibility while layering decorative elements below.
Fixes #522

Summary by CodeRabbit
Style
✏️ Tip: You can customize this high-level summary in your review settings.