Allow other modules to modify the contents of individual CSS files.

Called once per file at aggregation time.

Parameters

string $data: File contents. Depending on settings/modules these may be minified.

array $css_asset: Asset array.

See also

\Drupal\advagg\Asset\CssCollectionOptimizer::optimize()

Related topics

1 function implements hook_advagg_css_contents_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

advagg_mod_advagg_css_contents_alter in advagg_mod/advagg_mod.advagg.inc
Implements hook_advagg_css_contents_alter().
1 invocation of hook_advagg_css_contents_alter()
CssCollectionOptimizer::optimize in src/Asset/CssCollectionOptimizer.php

File

./advagg.api.php, line 102

Code

function hook_advagg_css_contents_alter(&$data, array $css_asset) {
    // Remove all font-style rules applying italics.
    preg_replace("/(.*)(font-style\\s*:.*italic)(.*)/m", "\$0 --> \$1 \$3", $data);
}