- From: Noah Liebman via GitHub <noreply@w3.org>
- Date: Thu, 09 Oct 2025 22:24:40 +0000
- To: public-css-archive@w3.org
In few weeks ago in #12658, @Westbrook prompted me to figure out how to get the number of auto-fit columns in a grid. I did that (as had [others](https://frontendmasters.com/blog/count-auto-fill-columns/)), and I just realized that the `grid-columns()` function he’s proposing could be useful here. For example, `grid-column: span min(3, grid-columns())` I tried this technique and it seems to work: [Codepen demo](https://codepen.io/noleli/pen/ByjZjKL) -- GitHub Notification of comment by Noleli Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5852#issuecomment-3387662871 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 9 October 2025 22:24:41 UTC