In Less, variables can be used to set other variables. This allows you to create sets of variables derived from a single variable. For instance, a variable set can define a color palette or a set of related dimensions. Mathematical operations, as described in the Creating complex relationships between properties recipe in Chapter 1, Getting to Grips with the Basics of Less, and the Less built-in functions, as described in Chapter 4, Leveraging the Less Built-in Functions, can be used to assign the derived variables.
In this recipe, you will change the look of a simple layout by changing one single variable value. You will need a valid HTML5 document that should include the less.js
compiler and a Less file called project.less
.