See this answer to do it with css only Can I write a CSS selector selecting elements NOT having a certain class?
:not([class])
Actually, this will select anything witch do not have a .class applied to it.
I gathered a jsfiddle demo
html
fake-class will be green
empty class SHOULD be white
no class should be red
fake-class2 SHOULD be white
empty class2 SHOULD be white
no class2 SHOULD be red
css
h2 {color:#fff}
:not([class]) {color:red;background-color:blue}
.fake-class {color:green}