Skip to content

Commit 90be683

Browse files
Copilotobserverw
andauthored
Fix horizontal overflow of example cards on small screens (#6)
* Initial plan * Fix horizontal overflow on small screens by adding min-w-0 to example cards and overflow-x-auto to syntax highlighter Co-authored-by: observerw <20661574+observerw@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: observerw <20661574+observerw@users.noreply.github.com>
1 parent 23729fe commit 90be683

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web/src/pages/HomePage.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export default function HomePage() {
296296
{/* Row 1: Intent + Request */}
297297
<div className="grid lg:grid-cols-2 gap-2 sm:gap-3 md:gap-4">
298298
<Card
299-
className={`transition-all duration-300 ${
299+
className={`min-w-0 transition-all duration-300 ${
300300
animationStep >= 0
301301
? "opacity-100 translate-y-0"
302302
: "opacity-0 translate-y-4"
@@ -325,7 +325,7 @@ export default function HomePage() {
325325
</Card>
326326

327327
<Card
328-
className={`transition-all duration-300 delay-75 ${
328+
className={`min-w-0 transition-all duration-300 delay-75 ${
329329
animationStep >= 1
330330
? "opacity-100 translate-y-0"
331331
: "opacity-0 translate-y-4"
@@ -388,7 +388,7 @@ export default function HomePage() {
388388
{/* Row 2: Processing + Result */}
389389
<div className="grid lg:grid-cols-2 gap-2 sm:gap-3 md:gap-4">
390390
<Card
391-
className={`transition-all duration-300 delay-100 ${
391+
className={`min-w-0 transition-all duration-300 delay-100 ${
392392
animationStep >= 2
393393
? "opacity-100 translate-y-0"
394394
: "opacity-0 translate-y-4"
@@ -442,7 +442,7 @@ export default function HomePage() {
442442
</Card>
443443

444444
<Card
445-
className={`transition-all duration-300 delay-150 border-primary/20 ${
445+
className={`min-w-0 transition-all duration-300 delay-150 border-primary/20 ${
446446
animationStep >= 3
447447
? "opacity-100 translate-y-0"
448448
: "opacity-0 translate-y-4"
@@ -548,7 +548,7 @@ export default function HomePage() {
548548

549549
if (match) {
550550
return (
551-
<div className="my-2 rounded-sm border border-border/40 bg-muted p-2.5">
551+
<div className="my-2 rounded-sm border border-border/40 bg-muted p-2.5 overflow-x-auto">
552552
<SyntaxHighlighter
553553
style={resolvedTheme === 'dark' ? oneDark : oneLight}
554554
language={match[1]}

0 commit comments

Comments
 (0)