BEM CSS

CSS is easy to learn? Most would say that yes, mainly because of the facility and the possibility of quickly seeing what we are doing. However, of course, that exists negative points and, when we talk about them, one of the principal is related to maintenance/organization of CSS.

Open a file and writing CSS is very easy and quick; however, give maintenance, organize it, and scale it are not trivial things. As your project grows, you start to lose patience with CSS or break windows get bigger and bigger. A good reading tip is an article (in pt-BR) Scalable CSS do Shankar Cabus.

BEM CSS

Several alternatives/thoughts/methodologies attempt to correct and assist in organizing and structuring a CSS project. One is the BEM (Block Element Modifier), created by the Yandex guys, a Russian search site.

As can be noted, the basic idea is to have three things:

Huh?! Imagine a list of items with an active item, something more like this: