Skip to main content
O'Reilly home
    • Sign In
    • Try Now
    • Teams
      • For business
      • For government
      • For higher ed
    • Individuals
    • Features
      • Certifications
      • Interactive learning
      • Live events
      • Answers
    • Blog
    • Content sponsorship

Sass and Compass in Action by Brandon Mathis, Chris Eppstein, Wynn Netherland, Nathan Weizenbaum

Get full access to Sass and Compass in Action and 60K+ other titles, with free 10-day trial of O'Reilly.

There's also live online events, interactive content, certification prep materials, and more.

Start your free trial

List of Listings

Chapter 1. Sass and Compass make stylesheets fun again

Listing 1.1. A soggy stylesheet in need of DRYing

Listing 1.2. Nesting CSS selectors

Listing 1.3. Resulting CSS after using nested selectors

Listing 1.4. Traditional CSS refactoring

Listing 1.5. Reusing code with @mixin and @include

Listing 1.6. Mixins help you remove redundant styles

Listing 1.7. Mixins with variables

Listing 1.8. Final CSS output after using mixins

Listing 1.9. Some CSS for error messages

Listing 1.10. Reducing redundancy with selector inheritance

Listing 1.11. Selector inheritance with the placeholder selector

Listing 1.12. Resulting CSS after using selector inheritance

Listing 1.13. Classic CSS reset

Listing 1.14. CSS output file, including CSS reset ...

Get Sass and Compass in Action now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.

Start your free trial

About O’Reilly

  • Teach/write/train
  • Careers
  • Community partners
  • Affiliate program
  • Submit an RFP
  • Diversity
  • O’Reilly for marketers

Support

  • Contact us
  • Newsletters
  • Privacy policy
facebook-logo linkedin-logo youtube-logo

Download the O’Reilly App

Take O’Reilly with you and learn anywhere, anytime on your phone and tablet.

Apple app store Google play store

Watch on your big screen

View all O’Reilly videos, Superstream events, and Meet the Expert sessions on your home TV.

Roku Payers and TVs Amazon appstore

Do not sell my personal information

O'Reilly home

© 2022, O’Reilly Media, Inc. All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.

Terms of service • Privacy policy • Editorial independence

Don’t leave empty-handed

Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact.

It’s yours, free.

Get it now
Cover of Software Architecture Patterns