Legionar Legionar - 4 months ago 20
CSS Question

CSS selector for not having classes

I am using selector to select all elements not having one class:

.list th:not(.foo) {
/* some rules */

How I can apply this to more classes?

.list th:not(.foo), .list th:not(.bar) {
/* some rules */

The CSS above of course will not do that, I need something like this pseudo:

.list th:not(.foo and .bar)

Is it possible in CSS?


You can use as many :not() selectors as you like.