Skip to Content
Pragmatic Guide to Sass 3
book

Pragmatic Guide to Sass 3

by Hampton Lintorn Catlin, Michael Lintorn Catlin
July 2016
Intermediate to advanced
130 pages
2h 11m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Sass 3
12Using Media Queries

Media queries are essential tools in CSS for developing responsive web designs. They allow us to conditionally apply styles to a site based on the width of the browser—without relying on complex JavaScript.

Typically, when designing a responsive website, it’s important to specify size classes. Size classes are a range of acceptable browser widths matched against styles for a site. For instance, you might say that less than 400px is considered the mobile-size class, while greater than 1200px is the large desktop-size class.

Sass makes it easier to define these style classes by allowing you to use variables with @media declarations. You can define, in one place, all your size classes and then use those variables throughout ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Sass

Jump Start Sass

Hugo Giraudel, Miriam Suzanne
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Mastering Sass

Mastering Sass

Luke Watts

Publisher Resources

ISBN: 9781680502060Errata Page