appjeniksaan
KPCKevin Powell - Community
•Created by appjeniksaan on 3/6/2024 in #front-end
Even/odd row styling with CSS Grid and subgrid, is this a good idea?
For work, I needed some table styling and decided to use CSS Grid. Because I need even/odd row styling, I used subgrid. When searching online I couldn't find many solutions going this direction. I wrote a short post about it: https://appjeniksaan.nl/posts/table-row-styling-with-css-grid/
But now I am wondering, are there any disadvantages to styling it this way that I am overlooking? Or is the fact that subgrid is relatively new the reason that there aren't many descriptions for this solution?
Btw, I know that this is technically already a solved problem, since the code above works. But if there are some disadvantages to it that I am overlooking, or a solution that would be even better, I would really like to know about them.
17 replies