-
Book Overview & Buying
-
Table Of Contents
Mastering CSS Grid
By :
A feature that has not yet (at the time of writing) left the issue state on the CSSWG Drafts GitHub repository of the W3C is additional selectors for auto-filled, implicit grids. The entire issue can be found here: https://github.com/w3c/csswg-drafts/issues/1943.
The author of the original GitHub issue stated in 2017 that they’d like to see a :nth-row() selector. It would target all elements in a given row or pattern, similar to :nth-child(). Let’s also consider a pseudo-class called :nth-col(). It would function the same way but target columns instead.
We could, for example, give differing background colors to all elements in every odd row, or target every fifth column to attach different borders.
This polyfill can be especially useful to implement galleries or table-like structures on dashboards, as it eases the styling...