I'm trying to return to front end coding for the web. The last time I tried write CSS was 10 years ago, and back in that time, there was a disease called classitis. My comprehension of classitis maybe wrong, but I took it as to not litter your HTML document with too many CSS classes, and try to use cascading rules to keep your HTML mark up clean and lean.
For example, this could be classitis
<ul class="feed">
<li class="item">
<img src="" class="thumbnail"/>
<a href="" class="read-more">Read More</a>
</li>
</ul>
Using the advantage of cascading rules in CSS, we could remove all the classes except class="feed"
and then write CSS rules such as
.feed li img {/*style*/}
.feed li a {/*style*/}
This way, there's a greater degree of separation between content and presentation.
However, I admit that on very large web applications, it can be easy to forget what cascades what, and when other team members join the project, they are even more likely to have difficulty grasping the entire front end architecture. And it gets even more challenging when trying to re-factor the project if you didn't select the best root element to tag your class.
I see BEM being very useful in that the class naming conventions clearly identifies what every block and element is supposed to do. But doesn't that mean you're reintroducing classitis and also admitting that separating presentation from content is an unachievable fantasy? So that's my question.
Note - I see some people defined classitis as repeating class names within elements of a block (eg. parent, child and grand child are all mention the same class). Not sure if that was the industry accepted definition at the time, or if the definition of classitis was more generic to mean the the introduction of CSS classes/ids when you could have used cascading rules instead.