MDL-45545 csslib: Chunking handles commas in media query definitions

This commit is contained in:
Frederic Massart
2014-05-14 15:28:11 +08:00
parent c1ed254643
commit c83407f033
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -176,9 +176,9 @@ function css_chunk_by_selector_count($css, $importurl, $maxselectors = 4095, $bu
}
}
// Let's count the number of selectors, but only if we are not in a rule as they
// can contain commas too.
if (!$inrule && $char === ',') {
// Let's count the number of selectors, but only if we are not in a rule, or in
// the definition of a media query, as they can contain commas too.
if (!$mediacoming && !$inrule && $char === ',') {
$selectorcount++;
}