[csswg-drafts] Add a snapping threshold to CSS grid alignment and justification (#14186)

scottkellum has just created a new issue for https://github.com/w3c/csswg-drafts:

== Add a snapping threshold to CSS grid alignment and justification ==
## Problem

There are times when items within a grid are sized similarly, leaving small gaps, and other times when the gaps are much larger. In instances where there are small gaps it would look better to fill them using the `stretch` keyword, but where the gaps are wide, it would look better to use an alignment keyword like `start` or `center`.

<img width="603" height="260" alt="Image" src="https://github.com/user-attachments/assets/3417b13a-cb04-435d-aebb-4eb69378120d" />

## Proposal

One possible solution would be to add a `snap` function that holds an alignment keyword and a threshold. When the whitespace around the grid items is less than or equal to the threshold, then it renders as `stretch` instead of the keyword value.

```css
.grid {
  align-items: snap(start, 4rem);
}
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/14186 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 July 2026 13:34:07 UTC