Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Responsive Web Design by Example : Beginner's Guide - Second Edition

You're reading from   Responsive Web Design by Example : Beginner's Guide - Second Edition Build powerful and engaging responsive websites with ease

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783553259
Length 258 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Thoriq Firdaus Thoriq Firdaus
Author Profile Icon Thoriq Firdaus
Thoriq Firdaus
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Responsive Web Design FREE CHAPTER 2. Web Development Tools 3. Constructing a Simple Responsive Blog with Responsive.gs 4. Enhancing the Blog Appearance 5. Developing a Portfolio Website with Bootstrap 6. Polishing the Responsive Portfolio Website with LESS 7. A Responsive Website for Business with Foundation 8. Extending Foundation A. Pop Quiz Answers Index

Syntactically Awesome Style Sheets


Sass (http://sass-lang.com/) is a CSS preprocessor created by Hampton Catlin, Natalie Weizenbaum, and Chris Eppstein, which is the same team that also created Haml (http://haml.info/). Foundation, as mentioned at the beginning of this chapter, uses Sass to generate its CSS, and so will we. So, before we get our hands dirty, first we will delve into several Sass features, such as nesting, variables, mixins, functions, and others, that will allow us to write style rules more efficiently.

Nesting rules

Sass allows us to nest style rules into one another. This feature eventually allows us to write style rules that resemble the HTML structure of the web page. That way, the style rules can be more concise and more easy to scan through. Say, we added the header markup of our website, as follows:

<header>
  <h1><a href="#">Website</a></h1>
</header>

With Sass, we can construct the style rules, as follows:

header {
  background: #000...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime