In this recipe, you will learn how to create cross-browser background gradients with Sass using vendor prefixes.
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.
Learn how to create cross-browser background gradients with Sass by performing the following steps:
main.scss. This file should import the gradient partial file. So, the
main.scssshould contain a SCSS code like that shown here:
// scss-lint:disable ColorKeyword, ...