In the Creating background gradients recipe, you can read how to create a background gradient with the Less Elements library. In this recipe, you will create a background gradient with the Less Hat mixin library. The Less Hat library advertises on its website the ability to create unlimited gradients.
For this recipe, you will have to download the Less Hat mixin library, which can be done at http://lesshat.madebysource.com/. Use your favorite text editor to edit the Less code. The Less code can be compiled with the client-side less.js
compiler and be inspected in your browser. You should include the less.js
compiler in your HTML document, as described in the Downloading, installing, and integrating less.js recipe in Chapter 1, Getting to Grips with the Basics of Less.
First, download and unzip the Less Hat mixin library from http://lesshat.madebysource.com/ into your working directory.
Secondly, create a
gradient.less
file...