News for hackers. Stuff that matters.
Re:The Anti-Hero of CSS Layout – “display:table” (2014) by c-smile on Saturday February 11, 2017 @11:42AM (#13623333)
The only problem with display:table is that it still requires additional markup to organize elements in tables. Consider this definition list:

   <dl>
      <dt>Term1</dt> 
         <dd>Term1 defintion</dd>
      <dt>Term2</dt> 
         <dd>Term2 defintion</dd>
   </dl>
and the task of organizing it into two columns table: dt's in first column and dd's in second. Impossible either with display:table & co. or with display flex.

At the same time in Sciter[1] I can define that layout as

   dl { 
      flow: row(dt,dd); 
   } 
- replace dt/dd pairs in table rows. The table will have two columns. Pure styling without changes of markup semantic and structure.

[1] CSS: Flow property and Flex units in Sciter: https://sciter.com/docs/flex-flow/flex-layout.htm

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.
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.

Re:The Anti-Hero of CSS Layout – “display:table” (2014) by twhb on Saturday February 11, 2017 @12:11PM (#13623483)
It's already a good idea to add elements where logical, even when unnecessary, to aid styling, scripts, coder comprehension, and sometimes automated comprehension, and to reduce likelihood it must be edited later. One could argue that rows always form logical units - certainly in the above example - and thus should always be wrapped. WHATWG does permit wrapping dt-dd groups in divs.
Re:The Anti-Hero of CSS Layout – “display:table” (2014) by c-smile on Saturday February 11, 2017 @02:45PM (#13624356)
That "good idea" has a name "tag soup".

But even you can add some non-semantic DOM elements...

What if you have

    <ol>
      <li>first</li>
      <li>second</li>
      <li>third</li>
    </ol>
And you want to replace them in two,three,etc. aligned columns (depending on view size), like these:

   @media handheld {
      ul { flow:vertical; }
   } 

   @media ... {
      ul { flow:row(li,li); } // two columns
   } 

   @media ... {
      ul { flow:row(li,li,li); } // three columns
   }
Re:The Anti-Hero of CSS Layout – “display:table” (2014) by robin_reala on Saturday February 11, 2017 @02:12PM (#13624177)
Not that I diagree with your premise, but in this particular example the WHATWG HTML Living Standard now allows containing divs around dt/dd pairings[1] and browers support this fine.

[1] https://html.spec.whatwg.org/multipage/semantics.html#the-dl...

Re:The Anti-Hero of CSS Layout – “display:table” (2014) by c-smile on Saturday February 11, 2017 @02:26PM (#13624249)
That requires change of existing markup and somehow its semantic changes too, right?

Yet this is not "resolution friendly".

Re:The Anti-Hero of CSS Layout – “display:table” (2014) by robin_reala on Saturday February 11, 2017 @02:45PM (#13624360)
Semantics is defined by the specification, so in this case no. But yes, a change of the markup.
Re:The Anti-Hero of CSS Layout – “display:table” (2014) by c-smile on Saturday February 11, 2017 @02:52PM (#13624397)
What if space allows and I will want to have four columns table:

    dl { flow: row(dt,dd,dt,dd); } 
Changing markup structure is not a good idea if to consider that the same markup shall be used on different medias.