jakesgordon/sprite-factory — pull request #20 by wpiekutowski (2012-11-06 14:16:42+00:00)
Title: [patch] Order CSS rules by pseudoclass importance

According to CSS spec, CSS pseudo-classes like :link, :visited, :hover and :active must be ordered properly to take effect [1]. This patch orders CSS definitions generated by sprite-factory in this exact order. Rule without a pseudo class comes first. Please take a look at https://github.com/amberbit/sprite-factory/blob/pseudo_classes/test/images/reference/hover.css to see the result.

Let me know if you're ok with this change and if this patch can be improved in any way.

[1] http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes