• Alec LomasAlec Lomas, over 6 years ago (edited over 6 years ago )

    Like most things, it depends on the project. At work, I'm working on a project that's going down the BEM path (with a 7-1 Architecture pattern). I've done this with a few personal projects. I'm currently working on a side project that uses Tachyons, and it's nice (I even made my own module). I'm using it because I'm interested in the DRY-ness of functional CSS. The downside is, of course, that there's a very real chance my HTML will be less DRY -- but that's what templates are for.

    Regardless, for all custom CSS I make sure to have settings defined away from styling - things like spacing units, font stacks & sizing, colors, etc. These should be consistent with whatever framework you're using if you choose to use one.

    • I don't use frameworks very often, but I do use Sass libraries like Bourbon
    • I tend to use grid systems like Bourbon Neat when working with BEM stuff. Flexbox is not a grid system, but we will be getting a native one of those eventually.
    • I use rems for as many things as possible, with ems for media queries (as they're most consistent between browsers). Of course, there are small exceptions here and there.
    • As far as naming patterns go though, the most important thing is consistency. So I wouldn't mix BEM & Bootstrap -- I'd follow their naming convention.
    4 points