Book Image

Sass and Compass for Designers

By : Ben Frain
Book Image

Sass and Compass for Designers

By: Ben Frain

Overview of this book

Table of Contents (17 chapters)
Sass and Compass for Designers
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Programmatic Logic with Sass

In the last chapter, we used Compass to significantly improve the aesthetics of our design. Granted, there's still a lot of refining to do until it's something we can be proud of.

Despite this, rather than spend our remaining time tweaking existing values in the style sheets, let's demystify some of the seemingly impenetrable aspects of Sass—logic.

When it comes to writing style sheets, I believe I'm fairly pragmatic. Therefore, I am going to tell you straight away that in most instances you could get by just fine with no knowledge of the techniques we will look at in this chapter. Therefore, if you're happy to be mediocre, skip right ahead. I don't judge.

For those still reading I salute you. It means you want to be a Sass rock star. Excellent, that's the spirit. With that in mind, take a look at the amazing Ninja skills we will be using in this chapter:

  • Math calculations with Sass

  • Control directives and how to use them

  • Learning what interpolation is and...