Steven Bradley has been discussing ideas and approaches to writing CSS. He's looked at abstracting CSS and talked in some detail about Object Oriented CSS. If classic CSS sits on one side of an approach to writing CSS and OOCSS sits on the other, SMACSS sits somewhere in the middle. While he’ll do his best to cover the basics here, he recommends reading through the SMACSS documentation. It’s not a long read and of course it is the original source.
What is SMACSS?
SMACSS stands for Scalable and Modular Architecture for CSS and it has 2 core goals.
- Increase the semantic value of a section of HTML and content
- Decrease the expectation of a specific HTML structure
Like Object Oriented CSS, SMACSS is an approach to writing CSS and HTML with more emphasis placed on using classes. Unlike OOCSS, it doesn’t suggest using classes for everything. It’s fine with IDs and descendent selectors where appropriate.