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

Foreword

You're doing it wrong!

One day, a few years ago, I tweeted (https://twitter.com/Malarkey/status/6435096054):

"Pro tip — 'If your CSS is complicated enough to need a compiler or pre-processor, you’re [sic] doing it wrong!'"

After all, CSS isn't difficult to learn and it's easy to write and write quickly, so why would you need something like Sass?

People reacted (as they do) and told me I was wrong. They offered plenty of advice and plenty of reasons why using Sass would benefit what I do. I wasn't oblivious to their enthusiasm, so I pulled up the Sass website, ready to dive in:

"First of all, let's get Sass up and running. If you're using OS X, you'll already have Ruby installed. Windows users can install Ruby via the Windows installer, and Linux users can install it via their package manager."

Oh.

"Once you have Ruby installed, you can install Sass by running gem install sass."

Now you can berate me for not understanding the command line, if you like, but I'm a designer, not a developer. My degree is in Fine Art, not Computer Science. My background is print, not programming so I'll trade your ruby gems for my under-color removal and dot gain any day of the week.

How hard should this Sass thing be anyway?

sass --watch style.scss:style.css
sass --watch stylesheets/sass:stylesheets/compiled

That hard? Obviously.

My problem was that Sass documentation had typically been written by developers for developers. It used technical language and references and made assumptions about what a person wanting to get started with Sass would know. As I wasn't familiar with neither its language nor technologies I felt frustrated, stupid even, for not understanding and as a result I avoided using Sass for a long time.

Over the last few years, using HTML and CSS as tools as well as deliverables has become a huge part of my design workflow. I use code like I use Fireworks and I quickly iterate through design ideas by rapidly writing and rewriting CSS. I need writing code to be fast and fluid so I look out for tools that reduce friction.

Sass was a clear choice, and today I can't imagine writing CSS without it. I'd miss its extends, nested selectors, and variables. I'd miss mixins and the way Sass helps me manage color throughout my style sheets. But getting comfortable with Sass took more time than I would've liked.

That's why I wish I'd had this book when I was learning Sass. Ben has a rare talent for explaining complex concepts in clear language and he makes everything look simple and sound enjoyable. As a designer I felt Ben had written this book with me in mind and I'm sure developers will feel the same way.

I hope, no I know, that you'll enjoy this book as much as I did.

— Andrew Clarke

Andrew Clarke is a web designer at Stuff and Nonsense (http://stuffandnonsense.co.uk), author of the best-selling book Transcending CSS and the critically acclaimed Hardboiled Web Design, and co-host of the web business podcast Unfinished Business (http://unfinished.bz).