hook_css_alter

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 hook_css_alter(&$css)

Alter CSS files before they are output on the page.

Parameters

$css An array of all CSS items (files and inline CSS) being requested on the page.

See also

drupal_add_css()

drupal_get_css()

Related topics

Code

modules/system/system.api.php, line 822

<?php
function hook_css_alter(&$css) {
  // Remove defaults.css file.
  unset($css[drupal_get_path('module', 'system') . '/defaults.css']);
}
?>