Do you need a class per span? Perhaps you could you target all spans inside a li with a single class on the li.