dvtng / jss

JavaScript library for getting and setting CSS stylesheet rules
335 stars 54 forks source link

Added support for browsers (IE9) that store adjacent classes in opposite... #4

Closed chrisburgess7 closed 13 years ago

chrisburgess7 commented 13 years ago

... order i.e. .clsA.clsB and .clsB.clsA

I noticed an issue whereby IE9 (can't recall if other versions of IE do the same) record classes adjacent to each other in opposite order than defined. So if an original css selector was defined as .clsA.clsB { ... }, IE9 would actually store it as .clsB.clsA { ... }, causing this code to not recognise it as the same. I've added a method which takes a css selector, and swaps any adjacent classes, and then tests for that on top of the existing selector text test. Don't know if you're still around working on this as you haven't been active for a little while, but I thought I'd let you know about it in case.

chrisburgess7 commented 13 years ago

Made a mistake when branching this functionality off my master branch, I've created a new fixed branch and will submit a pull request for that one.