/css-best-practices

Slides for the "CSS Best Practices at H&C" talk, on Feb. 2021

CSS Best Practices

CSS Best Practices

Writing good front of the front-end code is key for any front-end project ✨ 🎨 📐

There are multiple reasons for that: reusability, performance, accessibility, maintainability, semantics, consistency, better developer experience…

5 basic principles

Based on good practices I learned during some years:

  1. CSS specificity
  2. BEM methodology
  3. ITCSS
  4. Reusable HTML patterns
  5. Common bad practices (and how to address them)

One more thing…

  1. Final thoughts + Q&A

Considerations

Most examples written in Sass (*.scss syntax).