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

Creating background gradients


In the Importing and downloading prebuilt mixin libraries recipe, you can read how to create a grayscale gradient with the Less Elements library. In this recipe, you will learn how to create a colored gradient with the Less Elements library.

Getting ready

For this recipe, you will have to create the index.html and less/gradient.less files. You can compile your Less code using the client-side less.js compiler, as described in the Downloading, installing, and integrating less.js recipe in Chapter 1, Getting to Grips with the Basics of Less also, add a copy of less.js into your working directory. Finally, you should end up with the following file and directory structure:

You will also have to download and unzip the Less Elements library into your working directory. The Less Elements library can be found at http://www.lesselements.com/. Read the Importing and downloading prebuilt mixins libraries recipe to find out how to install the Less Elements library.

How to do...