O'Reilly logo

Sass and Compass Designer's Cookbook by Bass Jobsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using vendor prefixes

In this recipe, you will learn how to create cross-browser background gradients with Sass using vendor prefixes.

Getting ready

Also, read the Writing mixins with arguments recipe of Chapter 3, Variables, Mixins, and Functions. Of course, you will need the Ruby Sass compiler for this. The Installing Sass for command line usage recipe of Chapter 1, Getting Started with Sass, describes how to install Ruby Sass on your system.

How to do it...

Learn how to create cross-browser background gradients with Sass by performing the following steps:

  1. Create your main project file called main.scss. This file should import the gradient partial file. So, the main.scss should contain a SCSS code like that shown here:
    // scss-lint:disable ColorKeyword, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required