Skip to content

Commit 6a3d4cb

Browse files
adewaleclaude
andcommitted
fix: Carousel buttons hidden due to flexbox overflow
The carousel wrapper used display:flex with flex:1 on the track, but the track expanded to its content width (3508px for 10 cards), pushing navigation buttons off-screen. Changed to CSS Grid with grid-template-columns: auto 1fr auto, which properly constrains the middle column while keeping buttons at fixed sizes. Also switched from percentage to fixed pixel widths for cards (340px desktop, 260px mobile) to prevent layout shifts when card count changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9bb0d60 commit 6a3d4cb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/src/components/LandingPage.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
}
131131

132132
.landing-carousel-wrapper {
133-
display: flex;
133+
display: grid;
134+
grid-template-columns: auto 1fr auto;
134135
align-items: center;
135136
gap: 12px;
136137
}
@@ -139,7 +140,7 @@
139140
width: 36px;
140141
height: 36px;
141142
border-radius: 50%;
142-
background: var(--color-bg);
143+
background: var(--color-surface-elevated);
143144
border: 1px solid var(--color-border);
144145
color: var(--color-text-muted);
145146
font-size: 1.1rem;
@@ -148,7 +149,6 @@
148149
display: flex;
149150
align-items: center;
150151
justify-content: center;
151-
flex-shrink: 0;
152152
}
153153

154154
.landing-carousel-btn:hover:not(:disabled) {
@@ -164,6 +164,7 @@
164164
.landing-carousel-track {
165165
flex: 1;
166166
overflow: hidden;
167+
min-width: 0;
167168
}
168169

169170
.landing-carousel-slides {
@@ -173,7 +174,7 @@
173174
}
174175

175176
.landing-example-card {
176-
flex: 0 0 calc(44% - 8px);
177+
flex: 0 0 340px;
177178
background: var(--color-bg);
178179
border: 1px solid var(--color-border);
179180
border-radius: 10px;
@@ -257,6 +258,6 @@
257258
}
258259

259260
.landing-example-card {
260-
flex: 0 0 calc(80% - 8px);
261+
flex: 0 0 260px;
261262
}
262263
}

0 commit comments

Comments
 (0)