Today I stumbled upon a CSS attribute selector which made me think.
The interesting thing here is the [class] part of the CSS. If I understand correctly, this means, that elements should be selected which have the class attribute. I understand why someone might be interested to style all images with alt-tags differently: img[alt]. But is there any legitimate use of [class]? Cause this only says: select elements which have a class assigned… It does not even check WHICH class, it selects just all classes. And it gets weirder when it is combined with a specific class like fooClass in this example. Has anybody an idea what this means?