CHAPTER 3

image

Advanced Sass

In the previous chapter, you looked into the installation procedure and essential components needed to work with Sass. In this chapter, you will look into the more advanced concepts of Sass.

This chapter explores the following aspects of Sass:

  • @import
  • @media
  • @extend
  • @at-root
  • Mixin directives
  • Function directives
  • Output style
  • Building your own grid system

@import

Sass also supports importing features similar to what is available in native CSS. But unlike CSS, which downloads CSS when an @import is encountered, Sass and SCSS files imported using the SASS @import rules will be merged and output as a single file after compilation.

Get Beginning CSS Preprocessors: With SASS, Compass.js, and Less.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.