4 ms·
To be more specific, the article doesn't say this isn't possible with CSS, but that it isn't possible with nested grids. Which, of course, doesn't mean it's ea
by GordonS 7y ago
To be more specific, the article doesn't say this isn't possible with CSS, but that it isn't possible with nested grids.
Which, of course, doesn't mean it's easy or even sane to implement in CSS...
- myfonj 7y agoFor variable amount of "cards" that could eventually wrap this really is not possible to do in pure CSS without subgrid, as sibling comment confirmed. It is possible for fixed amount of cards: simple grid with named areas; it is possible for variable amount of cards when at least two of its components (e.g. header and footer) have fixed height: flex (or grid). Once you have to match more than one variable dimension across two axis (headers/bodies/footers laid in vertical axis matching their "siblings" in horizontal axis in our example) you need either JavaScript, broken semantics or subgrid. This is -- as I understand it -- raison d'etre of CSS Grid Level 2.
- GordonS 7y agoWell, I'll take your word on it. There's zero chance I'm going to spend the next 4 years battling with CSS in an attempt to prove otherwise ;)