If I have HTML like this:
<div class="modal">
<div class="class1">
class1
</div>
<div class="class2">
class2
</div>
</div>
And LESS that looks like this:
.class1 {
color: green;
}
.modal {
.class1 {
color: red;
}
}
Then how is it determined which properties get applied to the element?
In the above example, class1
gets colored red
but why? If I reorder the SCSS classes, then the class1
text is STILL red so I don't understand how its determined which is used.