💡 CSS Tip! Using modern CSS, it is now easy to extract information from a responsive grid. You can get the number of columns, the number of rows, and item coordinates. css-tip.com/grid-informa... A handy code to save for (hopefully) the near future.
Post
If you really need those integer values sometimes, shouldn’t CSS just provide them? I don’t have encountered strong use cases for that myself, but suggested such anyway, as predefined counters in #12824, but functions might work better in general.
github.comgithub.com
That would be a lot of things to consider (grid template, subgrid, spanning multiple column/row) so I suppose it will be too much work to implement compared to a few CSS lines to get the values for a specific case. But maybe one day will have such a thing.
0 reposts0 likes
No replies yet.