css - Select HTML element with single class but do not select others with multiple classes? -
suppose have component .table-view has .table-cell child, , want keep classes clean, how select .table-cell has no other classes , direct descendant of table-view?
open kind of advanced selector implemented in relatively new webkit.
<div class="table-view"> <div class="table-cell"> <!-- how select html element without selecting others? --> </div> <div class="table-cell split"> <div class="table-cell"> </div> <div class="table-cell"> </div> </div> </div>
you can use element - attribute selector (fiddle)
.table-view > div[class=table-cell] { /* styles goes here */ }
Comments
Post a Comment