Slightly improved handling of large grid size in CSS