3 ms·
TIL about display:contents. I’ll have to check it out but it sounds like it does: https://bengammon.co.uk/css-grid-and-display-contents/ https://bengammon.co.uk
by bobthepanda 2y ago
TIL about display:contents. I’ll have to check it out but it sounds like it does: https://bengammon.co.uk/css-grid-and-display-contents/ https://bengammon.co.uk/css-grid-and-display-contents/
Subgrid lets you do it for anything more involved or deeper though.
- noduerme 2y agoI think subgrid might give you a freer hand. Because if I remember correctly, the trouble with display:contents is that no other styles you put on that element will affect elements within it. This means shifting all styles down a node, which can be a real pain and have knock-on effects.