Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.667
diff -u -p -r1.667 common.inc
--- includes/common.inc	29 Jun 2007 18:06:50 -0000	1.667
+++ includes/common.inc	30 Jun 2007 21:09:51 -0000
@@ -1540,6 +1540,7 @@ function drupal_get_css($css = NULL) {
   if (!isset($css)) {
     $css = drupal_add_css();
   }
+  drupal_alter('css', $css);
   $no_module_preprocess = '';
   $no_theme_preprocess = '';
 
@@ -2619,6 +2620,9 @@ function element_children($element) {
 function drupal_common_themes() {
   return array(
     // theme.inc
+    'css_alter' => array(
+      'arguments' => array('css' => NULL)
+    ),
     'placeholder' => array(
       'arguments' => array('text' => NULL)
     ),
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.359
diff -u -p -r1.359 theme.inc
--- includes/theme.inc	28 Jun 2007 09:11:06 -0000	1.359
+++ includes/theme.inc	30 Jun 2007 21:09:52 -0000
@@ -791,6 +791,18 @@ function theme_render_template($file, $v
  */
 
 /**
+ * Allows the theme to alter the css queue before it's rendered.
+ *
+ * @param $css
+ *   The array of css files from drupal_add_css().
+ * @return
+ *   An altered array of css files.
+ */
+function theme_css_alter($css) {
+  return $css;
+}
+
+/**
  * Formats text for emphasized display in a placeholder inside a sentence.
  * Used automatically by t().
  *
@@ -1537,7 +1549,7 @@ function template_preprocess_page(&$vari
   $variables['site_name']         = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
   $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
   $variables['css']               = drupal_add_css();
-  $variables['styles']            = drupal_get_css();
+  $variables['styles']            = drupal_get_css(theme('css_alter', $variables['css']));
   $variables['scripts']           = drupal_get_js();
   $variables['tabs']              = theme('menu_local_tasks');
   $variables['title']             = drupal_get_title();
