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.

CommentFileSizeAuthor
#1 css-system.patch2.71 KBfubhy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fubhy’s picture

Issue summary: View changes

Updated issue summary.

fubhy’s picture

Status: Active » Needs review
FileSize
2.71 KB
JohnAlbin’s picture

Issue tags: +frontend performance

Tagging.

gagarine’s picture

Status: Needs work » Needs review

#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?

gagarine’s picture

Issue summary: View changes

Update the issue summary.

The last submitted patch, css-system.patch, failed testing.

Status: Needs review » Needs work
bill richardson’s picture

Issue summary: View changes
Status: Needs work » Closed (fixed)

drupal_add_css not being used in Drupal 8