I've been seeing CSS like this lately:
1.
.header {
position: relative;
max-height: 1000px;
z-index: 1;
.sidebar{
padding: 25px 25px;
}
.menu{
border-radius:0;
min-height: 30px;
height:100px;
i{
color:#CCC !important;
width:40px;
}
}
}
I guess header is the parent class and sidebar and menu are child classes of header.
Is this valid CSS syntax or good practice?
Usually I would expect CSS like this:
2.
.header { ... }
.header .sidebar { ... }
.header .menu { ... }
or even
3.
.header { ... }
.header > .sidebar { ... }
.header > .menu { ... }
What is the difference between these 3 cases?