I really enjoyed finding out you could create a media query variable that you can easily reuse and makes your code much more readable.
@tablet: ~\"(min-width
I'm not a 100% certain of the output you are going for, but this LESS only defines the color red
once, and applies it to both:
@tablet: ~"(min-width: 768px) and (max-width: 980px)";
body {
aside { color: blue }
&.homepage {
aside { color: red }
}
@media @tablet {
.homepage;
}
}
Yields this CSS:
body aside {
color: #0000ff;
}
body.homepage aside {
color: #ff0000;
}
@media (min-width: 768px) and (max-width: 980px) {
body aside {
color: #ff0000;
}
}