4 ms·
A lot of the early philosophy around CSS was in response to a world of nested tables and font tag soup managed across large websites with no build step. Simila
by dasil003 6y ago
A lot of the early philosophy around CSS was in response to a world of nested tables and font tag soup managed across large websites with no build step. Similarly JS was sprinkled on and wholly additive. In that world separation along file type made perfect sense.
However when all your code is pre-processed before deployment, it opens the door to organizing your code in different ways. Because markup, appearance and behavior are all intimately intertwined, it’s an illusion that they can be meaningfully de-coupled.
For simple document based sites with a small number of styles and a large number of homogeneous pages the classic style is good. For large web apps there is a reason React and JSX is so successful-99% of the time the visual, structural and behavioral changes happen together so it makes sense for the code to be together. The reason Webpack is so successful is because at scale it’s really hard to identify dead HTML and CSS, but if you unify under one build paradigm you can get tree-shaking that could never be made reliable with a homegrown solution or enforced coding standards.
- TeMPOraL 6y agoI did webdev jobs in that period and I never felt it made sense. The soup of nested tables only got replaced with a soup of nested divs, themselves already breaking the "separation of content and presentation", because many of these divs only existed to hook specific CSS rules of them. HTML markup was driven by limitations of CSS in expressing a particular graphical design of the page that you had in mind.