hook_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface$assets)
Alter CSS files before they are output on the page.
$css: An array of all CSS items (files and inline CSS) being requested on the page.
\Drupal\Core\Asset\AttachedAssetsInterface $assets: The assets attached to the current response.
Drupal\Core\Asset\LibraryResolverInterface::getCssAssets()
function hook_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets) { // Remove defaults.css file. unset($css[drupal_get_path('module', 'system') . '/defaults.css']); }
© 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!Render!theme.api.php/function/hook_css_alter/8.1.x