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
Mastering Responsive Web Design

You're reading from   Mastering Responsive Web Design Push your HTML and CSS skills to the limit and build professional grade, responsive websites

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781783550234
Length 334 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ricardo Zea Ricardo Zea
Author Profile Icon Ricardo Zea
Ricardo Zea
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Harness the Power of Sass for Responsive Web Design FREE CHAPTER 2. Marking Our Content with HTML5 3. Mobile-first or Desktop-first? 4. CSS Grids, CSS Frameworks, UI Kits, and Flexbox for RWD 5. Designing Small UIs Driven by Large Finger 6. Working with Images and Videos in Responsive Web Design 7. Meaningful Typography for Responsive Web Design 8. Responsive E-mails Index

Chapter 1. Harness the Power of Sass for Responsive Web Design

Before we dive into mastering responsive web design, we need to be on the same page as far as technologies go, in our case, CSS preprocessors and, specifically, Sass.

In this book, all CSS is going to be written in Sass in SCSS format. The way we write CSS has changed; it has improved tremendously.

CSS preprocessors such as Sass, LESS, and Stylus give the web/mobile designers and developers new superpowers. Yes, I used the word superpowers because that's exactly how I felt only a few hours after using Sass for the first time, and what I used was as basic as it gets:

.navigation-bar {
    display: flex;
    li {
        padding: 5px 10px;
    }
}

See the nested li selector? Yeah, that's Sass in action. When the preceding code is compiled, this is what it looks like:

.navigation-bar {
   display: flex; 
}
.navigation-bar li {
   padding: 5px 10px;
}

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Let's see what's in store for us in this chapter:

  • How does Sass work?
  • The basic concepts of Sass to consider for Responsive Web Design (RWD)
You have been reading a chapter from
Mastering Responsive Web Design
Published in: Aug 2015
Publisher:
ISBN-13: 9781783550234
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 €18.99/month. Cancel anytime