Variables in LESS
The LESS language allows you to use variables. A variable is a container in which you can store some data and use it in the right places in the code.
To create a variable, you need to come up with a name for it and put the @ sign before it. Then, after the variable name, put a colon and specify the value of this variable. Let's make a variable named var as an example:
@var: 20px;
Let's now use this variable as a property value:
p {
font-size: @var;
}
As a result, after compilation into CSS, our variable will be substituted with its value:
p {
font-size: 20px;
}
Tell me what the result of compiling the following code will be:
@color: #000;
p {
color: @color;
}