public function AmpCssCollectionRenderer::strip in Accelerated Mobile Pages (AMP) 8.3
Strip css which won't validate as AMPHTML.
Parameters
string $value: The css to strip.
Return value
string The stripped css.
1 call to AmpCssCollectionRenderer::strip()
- AmpCssCollectionRenderer::render in src/
Asset/ AmpCssCollectionRenderer.php - Renders an asset collection.
File
- src/
Asset/ AmpCssCollectionRenderer.php, line 277
Class
- AmpCssCollectionRenderer
- Renders CSS assets.
Namespace
Drupal\amp\AssetCode
public function strip($value) {
// Remove css that won't validate as AMPHTML.
$invalid = [
'!important',
];
$value = str_replace($invalid, '', $value);
return $value;
}