Nested constructs in LESS
In LESS you can nest blocks of code inside each other, like this:
#header {
.menu {
color: red;
}
.logo {
width: 100px;
}
}
As a result, after compilation, the nesting of blocks is transformed into the nesting of the corresponding selectors:
#header .menu {
color: red;
}
#header .logo {
width: 100px;
}
Tell me what the result of compiling the following code will be:
div {
p {
color: red;
}
ul {
color: blue;
}
}
Tell me what the result of compiling the following code will be:
div {
color: red;
p {
color: blue;
}
}
Tell me what the result of compiling the following code will be:
div {
color: red;
ul {
color: blue;
li {
font-size: 20px;
}
}
}