summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.api.php13
-rw-r--r--modules/system/system.module8
2 files changed, 17 insertions, 4 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 2a3fbec7b..685f16ac3 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -281,6 +281,19 @@ function hook_library_alter(&$libraries, $module) {
}
/**
+ * Alter CSS files before they are output on the page.
+ *
+ * @param $css
+ * An array of all CSS items (files and inline CSS) being requested on the page.
+ * @see drupal_add_css()
+ * @see drupal_get_css()
+ */
+function hook_css_alter(&$css) {
+ // Remove defaults.css file.
+ unset($css[drupal_get_path('module', 'system') . '/defaults.css']);
+}
+
+/**
* Perform alterations before a page is rendered.
*
* Use this hook when you want to add, remove, or alter elements at the page
diff --git a/modules/system/system.module b/modules/system/system.module
index 77e93f3f5..1fb124faa 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1327,13 +1327,13 @@ function system_init() {
if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
global $custom_theme;
$custom_theme = variable_get('admin_theme', 0);
- drupal_add_css(drupal_get_path('module', 'system') . '/admin.css');
+ drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
}
// Add the CSS for this module.
- drupal_add_css(drupal_get_path('module', 'system') . '/defaults.css');
- drupal_add_css(drupal_get_path('module', 'system') . '/system.css');
- drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css');
+ drupal_add_css(drupal_get_path('module', 'system') . '/defaults.css', array('weight' => CSS_SYSTEM));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', array('weight' => CSS_SYSTEM));
// Ignore slave database servers for this request.