Book Image

Less Web Development Cookbook

Book Image

Less Web Development Cookbook

Overview of this book

Table of Contents (19 chapters)
Less Web Development Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building unlimited gradients with Less Hat


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.

Getting ready

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.

How to do it…

  1. First, download and unzip the Less Hat mixin library from http://lesshat.madebysource.com/ into your working directory.

  2. Secondly, create a gradient.less file...