By johnalbin on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.0-ALPHA3
Issue links:
Description:
Drupal 8’s CSS aggregation strategy has been improved slightly by removing the CSS_SYSTEM constant (which was briefly renamed to CSS_AGGREGATE_SYSTEM in D8). The CSS from System module is combined with CSS from other modules, thus reducing the number of aggregation files from 6 to 4.
Ensuring that the System CSS is loaded before a module's CSS is now accomplished with a 'weight' of CSS_COMPONENT - 10.
Drupal 7:
$page['#attached']['css'][ drupal_get_path('module', 'system') . '/css/system.module.css'] = array('group' => CSS_SYSTEM, 'every_page' => TRUE);
Drupal 8:
// Adjust the weights to load these early.
$page['#attached']['css'][ drupal_get_path('module', 'system') . '/css/system.module.css'] = array('weight' => CSS_COMPONENT - 10, 'every_page' => TRUE);
Impacts:
Module developers
Themers