A Simple BEM Advice
For some time now I have been using the BEM methodology for production and I came to a conclusion.
“Don’t get carried away!”
What I mean is, when I started using BEM I thought SASS will be my savior, I will use the sh*t out of ‘&’ and don’t ever repeat one single word…
This was a mistake. If you have a small project that won’t scale it’s okay, but if you have a big project that will grow, you and your colleagues are going to have a big problem. Code will get more and more complicated, even a simple navigation menu with some modifiers will be difficult to find the right line to change or add something.
Let me be more clear with an example.
This code after a while (or even now) will be incomprehensible. The solution is simple. Write some clean starting points. This code will sure be more readable if we change it to something like this
Now you will know what you are doing the next time you or someone else opens your SASS files.