3 ms·
I think it’s fair to say at this point that the “semantic classes with reusable cascading CSS” experiment has lost to local, component-based solutions. Overuse
by nojs 5y ago
I think it’s fair to say at this point that the “semantic classes with reusable cascading CSS” experiment has lost to local, component-based solutions. Overuse of !important is just another sign of that.
Having “clean” CSS doesn’t have the same benefits as clean, well structured code in other areas. The underlying assumption that you can change the visuals without major surgery to the HTML is basically never true, so if you do put the time in to structure the CSS perfectly it’s often wasted when the design changes a little.
Also (as someone said in another comment) the lifetime of CSS is short compared to other application code and certainly compared to backend data structures and business logic, meaning the technical debt isn’t a huge issue. Iteration speed is often more important.
- cphoover 5y ago" The underlying assumption that you can change the visuals without major surgery to the HTML is basically never true," I would disagree. I think an amazing amount can be done with CSS alone, but developers never take the time to really leverage the power of CSS. I think perhaps it's worth making a distinction between web app development, and content, (e.g. marketing, articles, weblogs, personal websites). While there is often crossover between the two I think that CSS was originally designed for styling content, which was the primary use of the web at the time. It fits less well at styling complex interactive component based web applications.
- alwillis 5y agoHaving “clean” CSS doesn’t have the same benefits as clean, well structured code in other areas. I disagree. There are huge benefits to clean, well structured CSS, including avoiding specificity wars and general fragility of making changes. See my other comment with more details: https://news.ycombinator.com/item?id=30761462 https://news.ycombinator.com/item?id=30761462