I’m convinced 40%+ of the anti-CSS complaining is out of frustration from folks who haven’t actually learned how Specificity works. I wrote CSS for five years before I knew this is a thing I needed to learn. It was @mholzschlag who taught me, at a presentation she gave in NYC.
Always frustrated because your CSS styles aren't working the way you intended? You should learn more about CSS Specificity! Check out my newest blog post 🙃 dev.to/emmawedekind/css-spec…
16
51
9
314
100% agree. I've found a big part of it is that many developers' first experience with CSS is often with frameworks like Bootstrap that have some really terrible anti-patterns in their codebases. Highly specific selectors, overriding its own values etc.
4
2
28
It's no wonder they write bad CSS & end up hating it. I think until you start diving into CSS more and discover methodologies like BEM–and its preaching of flat selectors–that writing CSS becomes much less of a headache. How we get everyone to learn that? Well that's the question
1
6
I don't think everyone should always use 'flat selectors'. Methodologies like OOCSS (the original) can be the right solution for big projects with dozens or hundreds of developers over years, but other projects are better served by other structures.
It depends™.
3
1
1
11
Very true. BEM itself isn't necessarily the right methodology, but it's a good example for people see it in action. But then again, as you said, there are much easier ways to approach it. It would be great to have a list of these articles to share with people when they complain.
1
1
Yes, and it changes frequently Ben, adding to the confusion. This is why we need better design thinking and common pathways along with a lot of #open discussion. Iterative processes, understanding the right tool for a given job and so on. Hope you're having a happy 2019 so far!
Jan 22, 2019 · 6:54 PM UTC
1
5



