$pathed_stylesheets = array(); foreach ($themes[$key]->info['stylesheets'] as $media => $stylesheets) { foreach ($stylesheets as $stylesheet) { - $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet; + if ($stylesheet == '*.css') { + $wildcards = file_scan_directory('sites/all/themes/'.$themes[$key]->name, '\.css$'); + foreach ($wildcards as $wildcard) { + $pathed_stylesheets[$media][$wildcard->name] = $wildcard->filename; + } + } else { + $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet; + } } }