simplify css calculations