O'Reilly logo

Sass and Compass Designer's Cookbook by Bass Jobsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying the OOCSS, SMACSS, and BEM methodologies

When reading the Creating more intuitive code and making inheritance clear and the Avoiding nested selectors too deeply for more modular CSS recipes of this chapter, you should have realized that creating maintainable and reusable CSS code with Sass, which performs well, means to find a compromise between using class selectors for everything and using deep selector rules that create tight coupling between HTML and CSS. Creating modular CSS code can be such a compromise.

The methodologies described in this recipe will help you better organize your CSS code. These methodologies build your CSS code as round reusable objects, modules, or blocks. Reusable components can be reused in all your projects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required