public function CssOptimizer::clean
public CssOptimizer::clean($contents)
Processes the contents of a CSS asset for cleanup.
Parameters
string $contents: The contents of the CSS asset.
Return value
string Contents of the CSS asset.
Overrides AssetOptimizerInterface::clean
File
- core/lib/Drupal/Core/Asset/CssOptimizer.php, line 42
Class
- CssOptimizer
- Optimizes a CSS asset.
Namespace
Drupal\Core\AssetCode
public function clean($contents) { // Remove multiple charset declarations for standards compliance (and fixing // Safari problems). $contents = preg_replace('/^@charset\s+[\'"](\S*?)\b[\'"];/i', '', $contents); return $contents; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Asset!CssOptimizer.php/function/CssOptimizer::clean/8.1.x