|
|
|
|
|
by goto11
2285 days ago
|
|
If you genuinely want a layout exactly like a html table you use display:table. You probably don't, but it is there if you want. You don't really need repeated class=table-row-for-display etc, this can be achieved by CSS contextual selectors. But in reality html tables was not designed as an all-round layout tool in the first place and the layout algorithm was never specified in detail. Flexbox and flexgrid are typically more appropriate and powerful as layout tools. |
|
I tried that once many years ago. It didn't work. It might work today but I no longer care.
> this can be achieved by CSS contextual selectors
That would be true if display:table worked, but it doesn't (or at least it didn't) and so it doesn't.
And you still need some markup for the contextual selectors to work on. The obvious choice is <table><tr><td>, or, if it existed, <display-table><tr><td>. Maybe <grid><gr><gd> but that's not going to happen.