-
Notifications
You must be signed in to change notification settings - Fork 317
Fix FeatureGrid 3/4-col overflow on narrow viewports + WCAG 2.4.1 skip link #22463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,9 +28,20 @@ const { columns = 2 } = Astro.props; | |
| grid-template-columns: 1fr; | ||
| } | ||
|
|
||
| /* 2-col layout: 2 × 320px + 20px gap = 660px → activate at 50rem (800px) */ | ||
| @media (min-width: 50rem) { | ||
| .feature-grid.columns-2 { grid-template-columns: repeat(2, minmax(20rem, 1fr)); } | ||
| } | ||
|
|
||
| /* 3-col layout: 3 × 320px + 2 × 20px gap = 1000px → activate at 72rem (1152px) | ||
| At 50rem the Starlight content area is only ~760px, causing the third column to | ||
| overflow past the viewport edge and be clipped. */ | ||
| @media (min-width: 72rem) { | ||
| .feature-grid.columns-3 { grid-template-columns: repeat(3, minmax(20rem, 1fr)); } | ||
| } | ||
|
|
||
| /* 4-col layout: 4 × 320px + 3 × 20px gap = 1340px → activate at 90rem (1440px) */ | ||
| @media (min-width: 90rem) { | ||
| .feature-grid.columns-4 { grid-template-columns: repeat(4, minmax(20rem, 1fr)); } | ||
|
Comment on lines
+31
to
45
|
||
| } | ||
| </style> | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||||||
| --- | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| <!-- Skip navigation link for WCAG 2.4.1 compliance. | ||||||||||
| Visually hidden until focused via keyboard; moves focus directly to the | ||||||||||
| main content area, bypassing repeated navigation blocks. --> | ||||||||||
|
Comment on lines
+5
to
+6
|
||||||||||
| Visually hidden until focused via keyboard; moves focus directly to the | |
| main content area, bypassing repeated navigation blocks. --> | |
| Visually hidden until focused via keyboard; allows users to jump directly | |
| to the main content area, bypassing repeated navigation blocks. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The breakpoint comments don’t match the actual
remvalues used: e.g.72remis 1152px (at 16px base), not 1000px, and90remis 1440px, not 1340px. Either update the comments to reflect the true conversions/assumptions (root font size, container vs viewport), or adjust the breakpoints to match the stated pixel thresholds.