sbeigel/NSAttributedString-Additions-for-HTML — comment on commit 7b9bf46e037a454a9f0a3f5b8bb843c2b80f5553
File:  line 0
By sbeigel:

No, the are not. The language element name ("tag") can be case-insensitive, depending on the language (e.g. HTML vs. XHTML). But the ID or class-selectors are case-sensitive! So selectors like "a" or "li" can be case-insensitive for HTML (not XHTML!) but selectors like "a.warning", ".error" or "#header" are case-sensitive.

If you really want to be on the safe side for non-XHTML, you'd have to lowercase the element names in your selectors to match them to (lowercased) tag names, but this would require a selector parser to exclude class and id selectors from lowercasing.

Another alternative would be to lowercase the class and id values in your style-matching, but technically CSS classes "error" and "ErrOr" are not the same as the would be using this approach.