CSS - How to apply rule to classes when they are children of either of two
parent classes?
I have parents .category-view and .search-results.
Each of those can have child .special-price that I want to style.
But I do not want to style .product-view .special-price.
Must I spell out multiple paths like this:
.category-view .special-price, .search-results .special-price {
}
Or is there a shorter way, something like
.category-view/.search-results .special-price {
}
Furthermore, I actually want to style both .special-price and .old-price,
so is there some way to do that? Like
.category-view/.search-results .special-price/.old-price {
}
... that would affect both of those children when they are below either of
those parents?
No comments:
Post a Comment