▲ | jbreckmckye 5 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
We tried this 20 years ago with "CSS zen" and the Bad Old Days of "semantic CSS". It failed because you cannot completely couple HTML structure and presentation. Usually you have more complex styles and visuals than your HTML can express and trying to invent selectors / HTML heirarchies to describe them gets difficult very quickly In addition you often need to support multiple style systems on a single web application whilst the design evolves, or else it becomes an all or nothing rollout when you change stuff. It's common for engineers who weren't around back then to look at the abstractions that modern FE systems provide, and question if they're even necessary. That's healthy. What's not healthy is assuming they were only invented for fake or historical reasons, and telling everyone to just abandon them for commercial projects. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | donatj 5 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
You've got the horse before the cart, and completely misunderstand Semantic CSS. The styling should simply serve to improve the content. The content should generally stand on its own without any styling. In semantic CSS the goal is to write your HTML with as little regard to presentation as possible. Your HTML is simply structuring human readable data. At this step you give it no thought of appearance. Styling that structured data comes second. You write the CSS to make the structured data look nice, and ideally do not touch the HTML in the process, at all. The styling is but an affectation. This fell out of favor because people cared more about looking flashy than quality content, they didn't want to put any thought into developing the actual page and wanted to start with the design. It's a symptom of the overall disease of the modern web. This is more achievable with modern CSS than ever before and I pray for it to make a comeback. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | robin_reala 5 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
20 years ago CSS didn’t have the power it does now. There was no :has, :where, subgrid, and a whole bunch of other tools that let us effectively decouple structure from styling. Times have now changed, and it’s worth evaluating whether there are opportunities to roll back some of the changes we were previously forced to make. |