Search code examples
csscss-selectors

Can the :not() pseudo-class have multiple arguments?


I'm trying to select input elements of all types except radio and checkbox.

Many people have shown that you can put multiple arguments in :not, but using type doesn't seem to work anyway I try it.

form input:not([type="radio"], [type="checkbox"]) {
  /* css here */
}

Any ideas?


Solution

  • Why :not just use two :not:

    input:not([type="radio"]):not([type="checkbox"])
    

    Yes, it is intentional