Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Currenly we are creating a separate CSS aggregation group just for the (three) system stylesheets.
/**
* Implements hook_init().
*/
function system_init() {
$path = drupal_get_path('module', 'system');
// Add the CSS for this module. These aren't in system.info, because they
// need to be in the CSS_SYSTEM group rather than the CSS_DEFAULT group.
drupal_add_css($path . '/system.base.css', array('group' => CSS_SYSTEM, 'every_page' => TRUE));
if (path_is_admin(current_path())) {
drupal_add_css($path . '/system.admin.css', array('group' => CSS_SYSTEM));
}
drupal_add_css($path . '/system.theme.css', array('group' => CSS_SYSTEM, 'every_page' => TRUE));
}
Instead of placing them in their own group (and thereby causing an additional aggregate) we could just move them into CSS_DEFAULT and give them a very tiny (negative) weight to move them to the top of the CSS_DEFAULT aggregation group.
Comment | File | Size | Author |
---|---|---|---|
#1 | css-system.patch | 2.71 KB | fubhy |
Comments
Comment #0.0
fubhy CreditAttribution: fubhy commentedUpdated issue summary.
Comment #1
fubhy CreditAttribution: fubhy commentedComment #2
JohnAlbinTagging.
Comment #3
gagarine CreditAttribution: gagarine commented#1: css-system.patch queued for re-testing.
I think we should rename the constant CSS_SYSTEM in CSS_SYSTEM_WEIGHT.
This can even be backported for D7?
Comment #3.0
gagarine CreditAttribution: gagarine commentedUpdate the issue summary.
Comment #6
bill richardson CreditAttribution: bill richardson as a volunteer commenteddrupal_add_css not being used in Drupal 8