KittyGiraudel/ama

Do you use a CSS naming convention?

Closed this issue · 1 comments

Hey Hugo. Could you share your preferred CSS naming convention (or scoping style, if that is even a term) and why? Feel free to elaborate as much as possible. :)

Hello,

I use BEM, and I have been doing so for years now. It is an efficient CSS naming convention to keep things clean and tidy. By being meaningful with class names, we can avoid a lot of specificity issues. Harry Roberts has been very convincing with this methodology, and I cannot recommend his articles enough:

Regarding architecture, I use a system of my own called the 7-1 pattern, which is (unintentionally similar to SMACSS from Jonathan Snook). It is heavily focused on Sass, but it has proven to work quite great on most projects. Many people told me good things about it, so I can only assume it's good. :)