Refactors code for spriteset css parser