Skip to content

Commit 0abfcea

Browse files
committed
Fix horizontal overflow on ultra-small screens (320px-360px)
Added comprehensive 360px breakpoint across all components to prevent horizontal scrolling on the smallest mobile devices: **Landing Page (index.module.css:232-280):** - Added 360px breakpoint with aggressive size/padding reduction - Reduced hero padding to 1.25rem 0.5rem (8px sides) - Scaled down title to 1.75rem with word-break for wrapping - Reduced all gaps and spacing throughout - Smaller buttons (0.9rem font, reduced padding) - Compact badges (16px height, 0.375rem gap) **HeroCodePreview (styles.module.css:140-179):** - Limited preview width to calc(100vw - 1rem) to prevent overflow - Added word-break and pre-wrap to force code wrapping - Ultra-compact terminal (8px buttons, 0.65rem title font) - Reduced code font to 0.75rem with horizontal scroll fallback - Applied wrapping to both pre and code elements **CodeShowcase (styles.module.css:222-290):** - Added overflow: hidden to tab container - Made tabs flex with min-width: 0 to prevent expansion - Ultra-compact tabs (0.7rem font, 0.5rem padding) - Text-overflow ellipsis on code block headers - Reduced code blocks to 0.7rem font with proper overflow handling - Ensured all containers respect viewport boundaries **FeatureGrid (styles.module.css:191-238):** - Reduced section padding to 1.5rem 0.5rem - Compact feature cards (1rem padding) - Smaller icons (2rem) and fonts throughout - Code blocks: 0.65rem font with horizontal scroll - Improved line-height for better readability on small text **QuickStartSteps (styles.module.css:257-327):** - Compact step numbers (40px) and content - Ultra-small copy button (0.65rem font) - Reduced all padding and gaps - Code blocks: 0.7rem font with overflow-x auto - Smaller CTA buttons (0.9rem font) **GitHubStats (styles.module.css:67-84):** - Added 360px breakpoint - Reduced stats to 1.125rem font - Ultra-compact labels (0.6rem) - Minimal gaps (0.5rem) All changes ensure no horizontal scrolling occurs on devices as small as 320px width while maintaining readability and usability.
1 parent 4a33e1e commit 0abfcea

File tree

6 files changed

+301
-0
lines changed

6 files changed

+301
-0
lines changed

src/components/CodeShowcase/styles.module.css

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,73 @@
218218
font-size: 0.8rem !important;
219219
}
220220
}
221+
222+
@media screen and (max-width: 360px) {
223+
.showcaseSection {
224+
padding: 1.5rem 0.5rem;
225+
}
226+
227+
.showcaseHeader {
228+
margin-bottom: 1.5rem;
229+
}
230+
231+
.showcaseHeader h2 {
232+
font-size: 1.5rem;
233+
}
234+
235+
.showcaseSubtitle {
236+
font-size: 0.875rem;
237+
padding: 0 0.5rem;
238+
}
239+
240+
.tabContainer {
241+
max-width: 100%;
242+
overflow: hidden;
243+
}
244+
245+
.tabs {
246+
gap: 0;
247+
margin-bottom: 1.25rem;
248+
flex-wrap: nowrap;
249+
padding-bottom: 0.5rem;
250+
}
251+
252+
.tab {
253+
padding: 0.5rem 0.5rem;
254+
font-size: 0.7rem;
255+
flex: 1 1 auto;
256+
min-width: 0;
257+
text-align: center;
258+
white-space: nowrap;
259+
}
260+
261+
.exampleDescription {
262+
font-size: 0.875rem;
263+
margin-bottom: 0.875rem;
264+
padding: 0 0.25rem;
265+
}
266+
267+
.codeOutputGrid {
268+
gap: 0.75rem;
269+
}
270+
271+
.codeBlockHeader {
272+
font-size: 0.7rem;
273+
padding: 0.375rem 0.5rem;
274+
white-space: nowrap;
275+
overflow: hidden;
276+
text-overflow: ellipsis;
277+
}
278+
279+
.codeBlock,
280+
.outputBlock {
281+
overflow: hidden;
282+
}
283+
284+
.codeBlock pre,
285+
.outputBlock pre {
286+
font-size: 0.7rem !important;
287+
padding: 0.5rem !important;
288+
overflow-x: auto !important;
289+
}
290+
}

src/components/FeatureGrid/styles.module.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,52 @@
187187
padding: 0.625rem !important;
188188
}
189189
}
190+
191+
@media screen and (max-width: 360px) {
192+
.featureSection {
193+
padding: 1.5rem 0.5rem;
194+
}
195+
196+
.header {
197+
margin-bottom: 1.5rem;
198+
}
199+
200+
.header h2 {
201+
font-size: 1.5rem;
202+
}
203+
204+
.subtitle {
205+
font-size: 0.875rem;
206+
padding: 0 0.5rem;
207+
}
208+
209+
.grid {
210+
gap: 0.875rem;
211+
}
212+
213+
.featureCard {
214+
padding: 1rem;
215+
}
216+
217+
.featureIcon {
218+
font-size: 2rem;
219+
margin-bottom: 0.625rem;
220+
}
221+
222+
.featureTitle {
223+
font-size: 1rem;
224+
margin-bottom: 0.375rem;
225+
}
226+
227+
.featureDescription {
228+
font-size: 0.85rem;
229+
margin-bottom: 0.625rem;
230+
line-height: 1.4;
231+
}
232+
233+
.featureCode pre {
234+
font-size: 0.65rem !important;
235+
padding: 0.5rem !important;
236+
overflow-x: auto !important;
237+
}
238+
}

src/components/GitHubStats/styles.module.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@
6363
font-size: 0.65rem;
6464
}
6565
}
66+
67+
@media screen and (max-width: 360px) {
68+
.statsContainer {
69+
gap: 0.5rem;
70+
margin: 0.75rem 0;
71+
}
72+
73+
.statItem {
74+
gap: 0.1rem;
75+
}
76+
77+
.statValue {
78+
font-size: 1.125rem;
79+
}
80+
81+
.statLabel {
82+
font-size: 0.6rem;
83+
}
84+
}

src/components/HeroCodePreview/styles.module.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,44 @@
136136
font-size: 0.8rem !important;
137137
}
138138
}
139+
140+
@media screen and (max-width: 360px) {
141+
.codePreview {
142+
max-width: calc(100vw - 1rem);
143+
margin: 1.5rem 0;
144+
}
145+
146+
.terminalHeader {
147+
padding: 0.375rem 0.5rem;
148+
}
149+
150+
.terminalTitle {
151+
font-size: 0.65rem;
152+
margin-right: 0.25rem;
153+
}
154+
155+
.terminalButtons {
156+
gap: 0.375rem;
157+
}
158+
159+
.terminalButton {
160+
width: 8px;
161+
height: 8px;
162+
}
163+
164+
.codeWrapper {
165+
max-height: 180px;
166+
}
167+
168+
.codeWrapper pre {
169+
padding: 0.5rem !important;
170+
font-size: 0.75rem !important;
171+
word-break: break-all;
172+
white-space: pre-wrap !important;
173+
}
174+
175+
.codeWrapper pre code {
176+
word-break: break-all;
177+
white-space: pre-wrap !important;
178+
}
179+
}

src/components/QuickStartSteps/styles.module.css

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,75 @@
253253
width: 100%;
254254
}
255255
}
256+
257+
@media screen and (max-width: 360px) {
258+
.quickStartSection {
259+
padding: 1.5rem 0.5rem;
260+
}
261+
262+
.header {
263+
margin-bottom: 1.5rem;
264+
}
265+
266+
.header h2 {
267+
font-size: 1.5rem;
268+
}
269+
270+
.subtitle {
271+
font-size: 0.875rem;
272+
padding: 0 0.5rem;
273+
}
274+
275+
.stepsContainer {
276+
max-width: 100%;
277+
}
278+
279+
.step {
280+
margin-bottom: 1.25rem;
281+
gap: 0.75rem;
282+
}
283+
284+
.stepNumber {
285+
width: 40px;
286+
height: 40px;
287+
font-size: 1.25rem;
288+
}
289+
290+
.stepContent {
291+
padding: 0.75rem;
292+
}
293+
294+
.stepTitle {
295+
font-size: 1rem;
296+
margin-bottom: 0.25rem;
297+
}
298+
299+
.stepDescription {
300+
font-size: 0.85rem;
301+
margin-bottom: 0.625rem;
302+
line-height: 1.4;
303+
}
304+
305+
.copyButton {
306+
font-size: 0.65rem;
307+
padding: 0.3rem 0.6rem;
308+
top: 0.25rem;
309+
right: 0.25rem;
310+
}
311+
312+
.codeContainer pre {
313+
font-size: 0.7rem !important;
314+
padding: 0.625rem !important;
315+
overflow-x: auto !important;
316+
}
317+
318+
.ctaContainer {
319+
margin-top: 1.5rem;
320+
gap: 0.5rem;
321+
}
322+
323+
.ctaContainer a {
324+
font-size: 0.9rem;
325+
padding: 0.625rem 1rem;
326+
}
327+
}

src/pages/index.module.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,53 @@
228228
height: 18px;
229229
}
230230
}
231+
232+
@media screen and (max-width: 360px) {
233+
.heroBanner {
234+
padding: 1.25rem 0.5rem;
235+
}
236+
237+
.heroContent {
238+
gap: 1.5rem;
239+
}
240+
241+
.heroText {
242+
gap: 0.875rem;
243+
}
244+
245+
.heroTitleContainer {
246+
gap: 0.5rem;
247+
}
248+
249+
.heroLogo {
250+
width: 36px;
251+
height: 36px;
252+
}
253+
254+
.heroTitle {
255+
font-size: 1.75rem;
256+
word-break: break-word;
257+
}
258+
259+
.heroSubtitle {
260+
font-size: 0.9rem;
261+
line-height: 1.4;
262+
}
263+
264+
.buttonGroup {
265+
gap: 0.5rem;
266+
}
267+
268+
.buttonGroup a {
269+
font-size: 0.9rem;
270+
padding: 0.625rem 1rem;
271+
}
272+
273+
.badges {
274+
gap: 0.375rem;
275+
}
276+
277+
.badges img {
278+
height: 16px;
279+
}
280+
}

0 commit comments

Comments
 (0)