Re:The Anti-Hero of CSS Layout – “display:table” (2014)
by olavk on Saturday February 11, 2017 @01:22PM
(#13623884)
CSS only needs additional elements in case you need to apply structures which is not already present in the HTML. To layout something as a grid you need two levels of grouping: what delimits a cell and what delimits a row. Free-from dt/dd sequences does not contain this information, since there may be multiple dt per dd and vice versa. If dt/dd could only appear in pairs (like in your example) you could say there is an implicit structure, but this is not necessarily the case.
[ Parent
| on HN ]
Re:The Anti-Hero of CSS Layout – “display:table” (2014)
by c-smile on Saturday February 11, 2017 @02:33PM
(#13624287)
> you need two levels of grouping
Not necessarily.
I can define
form { flow:row(label, input select textarea); }
to have typical form's two columns layout with all <label>s go to first column and input, select and textarea go to second. All non-matching elements are replaced as if they span full rows (like <caption> in tables).People at trying to simulate these things by using float and clear. Ugly, non-reliable, etc.