Hacker News new | ask | show | jobs
by emitstop 4018 days ago
For many reasons, namely that we've already solved most of these "problems" years ago with simple concepts like OOCSS, SMACSS, and BEM. I suggest taking a look at this rebuttal. http://keithjgrant.com/posts/against-css-in-js.html

The reasons people are running into problems with global css scope is because they don't understand the basics of how to write effective and maintainable CSS. Seems like many front end devs nowadays grew up with css hand-holding libraries like bootstrap, and can't seem to wrap their heads around completely necessary things like taking account for CSS specificity and how the cascade works and how to use it to your advantage.

1 comments

The way methodologies like BEM and SMACSS work is to acknowledge that the cascade never works to your advantage, and avoid it entirely.
The methodology gives you the tools to have control over the cascade. You cannot avoid it entirely.

Edit: Also the point I was getting at was that cascade is a useful and powerful tool, just as the methodologies for controlling it are. We will also soon have a property that will eliminate the cascade entirely... all:unset;

I just think the problems and solutions listed in the talk are either non-problems or are things that could be solved in superior ways. And that it introduces more problems and limitations than it solves.