StackExchange / StackExchange/Stacks
Grid spacing classes force horizontal scroll when grid items wrap
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 672
- Forks
- 107
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
When using our grid spacing classes responsively, they force a horizontal scroll when wrapping. This is the smallest example that will trigger this.
<div class="grid gs64 fw-wrap">
<div class="grid--cell">
This cell has dynamic content that ought to wrap with the window
</div>
<div class="grid--cell">
This cell has dynamic content that ought to wrap with the window
</div>
<div class="grid--cell">
This cell has dynamic content that ought to wrap with the window
</div>
<div class="grid--cell">
This cell has dynamic content that ought to wrap with the window
</div>
<div class="grid--cell">
This cell has dynamic content that ought to wrap with the window
</div>
</div>
At smaller window sizes, this forces a horizontal scroll.
Workaround
You can add an overflow-x-hidden to your parent for now, but we ought to solve the underlying issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied grid markup at smaller window sizes and inspect the grid spacing classes used by grid gs64 fw-wrap. Done means wrapped grid items no longer force horizontal scrolling without relying on the overflow-x-hidden workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- design, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100