Using a variable multiple times in SASS
One variable can be used multiple times:
$var: 20px;
p {
font-size: $var;
}
div {
font-size: $var;
}
The result of compiling the above code will be as follows:
p {
font-size: 20px;
}
div {
font-size: 20px;
}
Tell me what the result of compiling the following code will be:
$var: 100px;
#block {
width: $var;
height: $var;
}
Tell me what the result of compiling the following code will be:
$color: #000;
p {
color: $color;
}
div {
background-color: $color;
}
section {
border: 1px solid $color;
}