Skip to content

Commit 4778467

Browse files
authored
fix: Prevent mobile homepage overflow (#13453)
## Summary - prevent homepage grid cells from creating an implicit second mobile column - constrain feature illustrations to their containers at narrow breakpoints - keep the compute-saved label on one line with contained mobile sizing and spacing - keep existing desktop illustration and counter sizes ## Testing - `pnpm --dir apps/docs collect-examples-data` - `pnpm --dir apps/docs check-types` - browser validation at 320px, 390px, 400px, 430px, 433px, 458px, 459px, 498px, and 1280px widths - verified counter number and label bounds, spacing, and document width - pre-push format and TOML checks
1 parent 0e00d89 commit 4778467

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const sizingString =
2-
"mx-auto h-[160px] xs:w-[326px] sm:w-[542px] md:w-[194px] lg:w-[255px] xl:w-[298px] xs:w-full";
2+
"mx-auto h-[160px] max-w-full xs:w-[326px] sm:w-[542px] md:w-[194px] lg:w-[255px] xl:w-[298px] xs:w-full";

apps/docs/app/[lang]/(home)/page.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function HomePage() {
6464
}}
6565
className="relative border border-border/50"
6666
>
67-
<GridCell className="relative border-b border-border/50 col-span-2 px-6 py-12 xs:px-6 xs:py-12 md:p-16">
67+
<GridCell className="relative border-b border-border/50 col-span-full px-6 py-12 xs:px-6 xs:py-12 md:p-16">
6868
<DottedLines className="absolute top-0 bottom-0 left-0 right-0 overflow-hidden text-center flex items-center justify-center" />
6969
<div className="relative z-1 flex flex-col justify-center">
7070
<h1 className="mb-4 text-6xl font-semibold tracking-tighter text-center md:text-7xl">
@@ -77,10 +77,10 @@ export default function HomePage() {
7777
<div className="flex justify-center mt-2 mb-10">
7878
<div className="relative inline-flex w-full xs:w-auto">
7979
<div className="absolute inset-0 rounded-lg xs:rounded-[22px] bg-gradient-to-r from-[#FF1E56] to-[#0196FF] w-full xs:w-auto"></div>
80-
<div className="relative text-center rounded-md xs:rounded-[20px] m-[2px] bg-background dark:bg-black px-4 py-1.5 md:px-5 md:py-0.5 w-full xs:w-auto">
81-
<span className="flex flex-col gap-0 items-center xs:flex-row sm:gap-1 text-base sm:text-xl leading-tight bg-gradient-to-r from-[#FF1E56] to-[#0196FF] bg-clip-text text-transparent">
80+
<div className="relative text-center rounded-md xs:rounded-[20px] m-[2px] bg-background dark:bg-black px-2 py-1.5 md:px-5 md:py-0.5 w-full xs:w-auto">
81+
<span className="flex flex-col gap-0 items-center xs:flex-row xs:gap-1 text-base md:text-xl leading-tight bg-gradient-to-r from-[#FF1E56] to-[#0196FF] bg-clip-text text-transparent">
8282
<RemoteCacheCounterClient className="" />
83-
<span>hours of compute saved</span>
83+
<span className="whitespace-nowrap">hours of compute saved</span>
8484
</span>
8585
</div>
8686
</div>
@@ -99,7 +99,7 @@ export default function HomePage() {
9999
</div>
100100
</div>
101101
</GridCell>
102-
<GridCell className="border-0 h-fit col-span-2 px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
102+
<GridCell className="border-0 h-fit col-span-full px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
103103
<h2 className="mb-1 text-[32px] font-semibold tracking-tighter">
104104
Scale your workflows
105105
</h2>
@@ -121,7 +121,7 @@ export default function HomePage() {
121121
))}
122122
</div>
123123
</GridCell>
124-
<GridCell className="col-span-2 px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
124+
<GridCell className="col-span-full px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
125125
<div className="flex flex-col items-start justify-between gap-y-4 md:flex-row">
126126
<div className="flex flex-col gap-y-1">
127127
<h2 className="text-[32px] font-semibold tracking-tighter">
@@ -166,14 +166,14 @@ export default function HomePage() {
166166
</div>
167167
</div>
168168
</GridCell>
169-
<GridCell className="col-span-2 px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12 border-b border-border/50">
169+
<GridCell className="col-span-full px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12 border-b border-border/50">
170170
<h2 className="text-[32px] font-semibold tracking-tighter">
171171
What builders say about Turborepo
172172
</h2>
173173

174174
<Testimonials />
175175
</GridCell>
176-
<GridCell className="col-span-2 px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
176+
<GridCell className="col-span-full px-6 py-14 xs:px-6 xs:py-10 md:px-9 lg:px-12">
177177
<div className="flex flex-col items-start gap-y-6 md:flex-row md:items-center md:justify-between md:gap-x-6">
178178
<h2 className="text-[32px] font-semibold tracking-tighter md:text-[40px]">
179179
Deploy your Turborepo today.

0 commit comments

Comments
 (0)