What CSS Guidelines / Principles should i use?

over 9 years ago from , Freelance Frontend Developer

Hey, Im looking into learning a better way of organising my CSS and was wondering what you guys think are the best guidelines to follow? OOCSS, SMACSS or BEM?



  • Helen TranHelen Tran, over 9 years ago (edited over 9 years ago )

    You should try all of them and see if it works for you.

    I've always done something along the lines of what OOCSS proposes. I think it's a great starting point to learn how to abstract your code and generally reduce the amount of redundant styles you are creating. Additionally, I am a big fan of BEM but in large projects it can overcomplicate things when poorly implemented. If you go too crazy with it, the class names can get overwhelming and hard to read. Everything with a little bit of moderation is a good rule of thumb.

    As for SMACSS, I'm not a big fan of it at all. I have tried it on small and large projects. The rules for it are too fuzzy for me and I've found it slows down my production time because of the fuzziness. You may find you like it, but it hasn't worked at all for me.

    0 points
  • Tiago Sousa, over 9 years ago

    I'm starting to use SMACSS, didn't finish to read the book yet, but some concepts I'm applying already.

    0 points