[css-grid] Ability to clamp track spanning

Open
#5,852 12 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
frontend

Research direction

Start with the auto-fill example and the linked CSSWG issue 388 discussion, especially the proposed span-minmax(1, 3) syntax. Define how spanning should clamp when fewer columns are available while preserving normal multi-column spans. Done means the responsive grid no longer squishes extra columns and the proposed behavior is specified clearly.

Written by the indexing model from the issue text.

Description

css-grid-3 Needs Design / Proposal

Currently, if any element spans multiple columns when using auto-fill, the grid is incapable of gracefully handling sizing below that amount of columns. The extra columns get squished, as demonstrated in the following example:
css-grid-auto-fill-span

Using a syntax like span-minmax(1, 3) to clamp the spanning (as proposed by @MatsPalmgren here) would allow the grid to be fully responsive.

One such use case mentioned on that issue is:

  • Have "featured" items span multiple columns, but only when the columns become available
Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.