Skip to main content

Modular CSS

[4/100]

Today was spent more on reading web development articles and finishing the function classes on Udemy, that writing any code itself (total coding time 11 minutes!).

For a few days I have been planning to read an article on modular CSS. It stresses the importance of using BEM (block, element, module), OOCSS (object oriented CSS) and SMACCS (scalable & modular architecture for CSS) methodologies to write an easy to maintain and reusable code.

I think it was two years ago or so when I read for the first time a documentation on BEM. I never got to use it since I was never involved in a big project where this would come in handy and also I never decided that I should use it for any of my projects. Nevertheless, I realize that even on a smaller scale this approach might be convenient.

Without actually using it, I still have been trying to utilize the best practices when writing my code which are documenting, commenting, organizing by hierarchy and using comprehensive classes. Would it be easy for somebody else understand my custom code? I certainly hope so. Either way, I think every coder with time develops their own approach that works for them and they swear by it. However, I totally understand the call for unifying the code writing process and creating one 'language' that everybody understands.

In the near future, I will try to give it a go and see how I feel about it. To my understanding Bootstrap is written this way and it is so easy to work with. Once I grasp the general principle of the above methodologies, which my bet is it will take the most amount of time in this undertake, the rest should follow.

Comments