I want to do something like CSS:
.parent {
height: 100px;
width: 100px;
background-color: black;
.child {
height: 50px;
width: 50px;
background-color: red;
}
}
HTML:
<div class="parent">
<div class="child">
</div>
</div>
But this doesn't work. I will have to do this:
.parent {
height: 100px;
width: 100px;
background-color: black;
}
.parent .child {
height: 50px;
width: 50px;
background-color: red;
}
I will have to type the parent name again and again if there are many children elements inside parent. Is there any short way to do it?