-
Book Overview & Buying
-
Table Of Contents
LESS WEB DEVELOPMENT COOKBOOK
By :
In this recipe, you will learn how to use different mixin libraries together and use namespaces to prevent collisions between mixins with the same name.
In this recipe, two mixin libraries are used: Less Elements, which can be downloaded from https://github.com/dmitryf/elements/archive/master.zip, and the Less Hat library, which can be downloaded from https://github.com/madebysource/lesshat/archive/v3.0.2.zip.
Unzip both the ZIP archives into your working directory, and use the command-line lessc compiler, as described in the Installing the lessc compiler with npm recipe in Chapter 1, Getting to Grips with the Basics of Less, to compile your Less code.
Write down the Less code shown here into a file, and compile the file with the command-line lessc compiler:
#lesselements {
@import "elements-master/elements.less";
}
#lesshat {
@import "lesshat-master/build/lesshat.less";
}
div.drop-shadow {
#lesselements > .drop-shadow...
Change the font size
Change margin width
Change background colour