I notice a few different ways of applying styles and am trying to understand the differences between them, also if one can be used interchangeably with another? IF so, which is a better approach, and is there a newer standard among the below?
.rootClass { /*Styles for rootClass */ }
.rootClass > a > .classA.someClass, .rootClass > a > .classB.someClassB {
/* Styles */
}
.rootClass a.classA.someClass, .rootClass a.classB.someClassB{
/* Styles */
}
Also it will help to understand difference between:
.rootClass .classA.someClass, .rootClass .classB.someClassB{
/* Styles */
}
.rootClass.classA.someClass, .rootClass.classB.someClassB{
/* Styles */
}
Assuming I have the following HTML which styles can be possibly applied among the above?
HTML1:
<div class="rootClass">
<a class="classA someClass">Test</a>
</div>
HTML2:
<div class="rootClass">
<p class="classA">Some text here</p>
<span>
<p class="classA">More text here</p>
</span>
</div>