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

Importing and downloading prebuilt mixin libraries


In this recipe, you will download and install Less Elements. Less Elements is a library with prebuilt mixins that focuses on consolidating cross-browser prefixes into single, concise declarations. In the Using namespacing with prebuilt libraries and Creating background gradients recipes, you will find some other use cases for this library.

Getting ready

First, download Less Elements from http://lesselements.com/; the file should be saved and unzipped into the same directory with your other Less files. You can use the steps that are shown after the following command:

mkdir less
cd less
wget "https://github.com/dmitryf/elements/archive/master.zip"
unzip master.zip

Now, create an index.html page and a less/greyscalegradient.less file. 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...