Book Image

Sass and Compass Designer's Cookbook

By : Bass Jobsen, Stuart Robson
Book Image

Sass and Compass Designer's Cookbook

By: Bass Jobsen, Stuart Robson

Overview of this book

Sass and Compass Designer's Cookbook helps you to get most out of CSS3 and harness its benefits to create engaging and receptive applications. This book will help you develop faster and reduce the maintenance time for your web development projects by using Sass and Compass. You will learn how to use with CSS frameworks such as Bootstrap and Foundation and understand how to use other libraries of pre-built mixins. You will also learn setting up a development environment with Gulp. This book guides you through all the concepts and gives you practical examples for full understanding.
Table of Contents (23 chapters)
Sass and Compass Designer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


When coding Sass, you should realize that SCSS code compiles into valid CSS code. Sass does not guarantee that the CSS is modular, readable, or well-organized, and so easy to maintain. In this chapter, you will learn how to use nesting in your Sass code to reflect the visual hierarchy of your HTML and extend selectors to reduce the size of the compiled CSS code.

Also, the parent reference will be explained. You can use the & parent reference to use the parent selector in your code without having to explicitly use its name. The recipes in this chapter describe many useful use cases of the parent reference.

Sass does not generate bad code, but coders can. When you apply the Sass features described in this chapter, you should always keep the final result in your mind. For instance, nesting your code to follow the visual hierarchy of your HTML will make your code easier to read and maintain. On the other hand, nesting too deeply will produce overspecified CSS and will be considered...