| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
原始链接: https://news.ycombinator.com/item?id=43809484
Hacker News 上讨论了 CSS Zen Garden 及其对早期网页开发的影响。评论者回忆起基于表格布局的 CSS 时代之前的状况,以及最初对 CSS 的抵制,当时 CSS 被认为限制了设计。Dave Shea 的 CSS Zen Garden 演示了 CSS 的能力,消除了“单调乏味,像盒子一样”的误解。 对话随后深入探讨了 CSS 的演变。早期的 CSS 限制、浏览器兼容性问题以及对额外 HTML 的需求是巨大的障碍。现代 CSS 功能(如 flexbox 和 grid)改善了局面,但讨论也涉及到 CSS 组织、特异性以及 Tailwind CSS 等工具的兴起。一些人批评 Tailwind 模糊了语义 HTML 并阻碍了对 CSS 的深入理解,而另一些人则为其在大型项目中保持一致性和易于重构的实用性进行了辩护。关于结构与表现的分离、语义 HTML 的作用以及约定与实用性之间的平衡的争论仍在继续。
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Before CSS, layouts were implemented by abusing table elements to create a grid. Then images were sliced up into sections, and each section was placed into the table. This has generally been remembered in the present day, however what seems to have been forgotten was the pushback against CSS.
There was a large number of web developers who were happy with the status quo and refused to learn CSS. One of the most persistent myths was that you couldn’t make anything look nice with CSS. Specifically, CSS was accused of only being able to create “boring, boxy” designs.
It wasn’t true at all. Even back in the early days of CSS, you could create great layouts. It was especially absurd because the approach favoured by the people saying this was literally abusing tables to create grids.
So along comes Dave Shea and points out that this is ridiculous, that CSS is capable of great designs, and puts the CSS Zen Garden up. A whole bunch of people contribute good-looking designs and make it impossible for people to claim that “CSS can only produce boring, boxy designs”. I think it’s amusing that he won the argument so conclusively that people forget it was even an argument in the first place.
reply