Simplify CSS template rendering logic