by myfonj · 7y ago · 0 comments
+---+ +---+ +---+
|1H | |4H | |7H |
| H | | | | |
+---+ +---+ +---+
|2B | |5B | |8B |
| | | B | | |
+---+ +---+ +---+
|3F | |6F | |9F |
| | | | | F |
+---+ +---+ +---+
To get this you had to either compromise semantics (use [1,4,7],[2,5,8],… table) or resort to JavaScript (read computed dimensions, find tallest and unify rest).Graphic designers use this pattern very often. Finally coders will not have to worry about it anymore, soon. After 22 years of CSS.
Which, of course, doesn't mean it's easy or even sane to implement in CSS...
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.