Attribute Selectors (with empty strings) with no match and the Negation pseudo-class

Blue - Selector matches nothing (Correct)

Red - Selector matches (Incorrect)

Substring matching attribute selectors CSS3

p.test55:not([class^=""])

p.test65:not([class$=""])

p.test73:not([class*=""])

p.test74:not([class*=""])

p.test75-x:not([class*="-"]) - class="test75-x"

p.test76:not([class*=""]) - class="test76 x-y-z"

p.test77:not([class*=" "]) - class="test77 x-y-z"

p.test78:not([class*="-"]) - class="test78 x-y-z"

Other test with Wildcard Attribute Selectors

References and other links

  1. 6.3.2. Substring matching attribute selectors
  2. 6.6.7. The negation pseudo-class
  3. CSS3 Selectors Test Suite Index

Selectors - CSS Class Test