Live data from Hacker News

The Anti-Hero of CSS Layout – “display:table” (2014)

colintoh.com

1–10 of 60 posts

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#2
It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables".

I don't think people have a hard time understanding that you shouldn't use the

-element for something which is not a quote. But html tables had a more troubled history because for a long time html tables were the only way to achieve certain layout effects, which was not supported by pure CSS in mainstream browsers, because they didn't implement "display:table".

This article is well-intentioned but I think it also contains some language which muddies a pretty simple concept. Eg. it states CSS Table has a key differentiation over HTML Table. It can choose not to be a table by just adjusting its CSS properties. Something that HTML Table is incapable of. The sentence seem to confuse semantics with presentation, which is what got us into this mess in the first place.

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#3
post #2

It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables". I don't think people have a hard time understanding that you shouldn't use the -element for something which is not a quote.…

it seems to imply that semantics somehow matter when it comes to CSS - where the whole point of CSS is to extract the non-semantic styling into a separate document so that the structure of your HTML can have meaning.

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#4
post #2

It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables". I don't think people have a hard time understanding that you shouldn't use the -element for something which is not a quote.…

On the other hand, there are cases where HTML Tables put great challanges to user experience.

First to come to mind: A table with many rows displayed on a tiny mobile screen. The most common solution is to let the table overflow horizontally. There are other complex solutions, most of them fall in the CSS-Hack category.

In this case, to have a CSS table that can be something else on a tiny screen (via media queries) may lead to a successful UX solution.

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#5
post #2

It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables". I don't think people have a hard time understanding that you shouldn't use the -element for something which is not a quote.…

On the other hand, there are cases where HTML Tables put great challanges to user experience. First to come to mind: A table with many rows displayed on a tiny mobile screen. The most common solution is to let the table overflow horizontally. There are other complex solutions, most of them fall in the CSS-Hack category. In this case, to have a CSS table that can be something else on a tiny screen (via media queries)…

You mean a table with many columns, don't you?

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#6
post #5

Earlier quoted context omitted.

On the other hand, there are cases where HTML Tables put great challanges to user experience. First to come to mind: A table with many rows displayed on a tiny mobile screen. The most common solution is to let the table overflow horizontally. There are other complex solutions, most of them fall in the CSS-Hack category. In this case, to have a CSS table that can be something else on a tiny screen (via media queries)…

You mean a table with many columns , don't you?

Ah! Yes, indeed! Thank you.

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#7
post #2

It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables". I don't think people have a hard time understanding that you shouldn't use the -element for something which is not a quote.…

That is because people who do HTML markup are usually not developers. They are either wannabe developers or just incompetent people hired to reduce costs. They would never waste their time on reading something complicated as W3C standards and understanding concepts like semantic markup.

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#9
For what it's worth, the author mentioned that CSS Flexbox would also work, but the market share of IE 9 was too high at the time for him to use. That was 2014, and now the market share of IE (especially IE 9) is drastically lower.

https://www.w3counter.com/trends

http://caniuse.com/#feat=flexbox

Re: The Anti-Hero of CSS Layout – “display:table” (2014)

#10
post #2

It is fascinating how a perfectly sensible rule-of-thumb "you shouldn't use html tables for something which is not semantically a table" gradually morphed into various superstitions like "you shouldn't use html tables" or "you shouldn't use tables for layout" or even "you shouldn't use tables". I don't think people have a hard time understanding that you shouldn't use the -element for something which is not a quote.…

That is because people who do HTML markup are usually not developers. They are either wannabe developers or just incompetent people hired to reduce costs. They would never waste their time on reading something complicated as W3C standards and understanding concepts like semantic markup.

I'm curious about who read w3c standards, even on HN. I don't. Even MDN (which I consider as fork of w3c for humans) can be quite confusing so let's not judge people on this.
Post reply on HN