Changes LayoutTag.Static#writeGridCssByClasses to minimize the number of style element creation to avoid the 32 stylesheet limit in IE.