Index: t3lib/class.t3lib_compressor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- t3lib/class.t3lib_compressor.php (revision ) +++ t3lib/class.t3lib_compressor.php (revision ) @@ -188,25 +188,26 @@ // if $options['baseDirectories'] set, we only include files below these directories if ((!isset($options['baseDirectories']) || $this->checkBaseDirectory($filenameFromMainDir, array_merge($options['baseDirectories'], array($this->targetDirectory)))) - && ($fileOptions['media'] === 'all') ) { - $filesToInclude[] = $filenameFromMainDir; + $filesToInclude[trim($fileOptions['media'])][] = $filenameFromMainDir; // remove the file from the incoming file array unset($cssFiles[$key]); } } if (count($filesToInclude)) { - $targetFile = $this->createMergedCssFile($filesToInclude); + foreach ($filesToInclude as $media => $cssFilesToInclude) { + $targetFile = $this->createMergedCssFile($cssFilesToInclude); - $targetFileRelative = $this->relativePath . $targetFile; - $concatenatedOptions = array( - 'file' => $targetFileRelative, - 'rel' => 'stylesheet', + $targetFileRelative = $this->relativePath . $targetFile; + $concatenatedOptions = array( + 'file' => $targetFileRelative, + 'rel' => 'stylesheet', - 'media' => 'all', + 'media' => $media, - 'compress' => TRUE, - ); - // place the merged stylesheet on top of the stylesheets - $cssFiles = array_merge(array($targetFileRelative => $concatenatedOptions), $cssFiles); + 'compress' => TRUE, + ); + // place the merged stylesheet on top of the stylesheets + $cssFiles = array_merge(array($targetFileRelative => $concatenatedOptions), $cssFiles); + } } return $cssFiles; } \ No newline at end of file