Skip to content

Commit 48ec1c8

Browse files
authored
Refactor mobile carousel in SupportedBySection of Hero3D component (#29)
- Updated the mobile carousel layout to use a full-width approach with overflow hidden for improved responsiveness. - Removed unnecessary animation properties to streamline the rendering logic. - Enhanced visual consistency by adjusting margin calculations for better alignment on mobile devices.
1 parent 5e29e2f commit 48ec1c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/app/src/components/custom-ui/hero-3d.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,12 @@ export function SupportedBySection() {
153153
</motion.section>
154154

155155
{/* Mobile: auto-scrolling carousel - full width to edge */}
156-
<div className="md:hidden w-screen overflow-x-scroll scrollbar-hide -mt-4">
156+
<div className="md:hidden -mt-4 overflow-hidden" style={{ width: '100vw', marginLeft: 'calc(-50vw + 50%)', marginRight: 'calc(-50vw + 50%)' }}>
157157
<div
158158
className="flex gap-3"
159159
style={{
160160
width: 'max-content',
161161
animation: prefersReduced ? 'none' : 'scroll-carousel 25s linear infinite',
162-
animationFillMode: 'both',
163162
}}
164163
>
165164
{duplicatedLogos.map((logo, index) => renderLogo(logo, index))}

0 commit comments

Comments
 (0)