Index: edge.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/edge/edge.module,v
retrieving revision 1.4
diff -u -p -r1.4 edge.module
--- edge.module	9 Nov 2010 23:50:40 -0000	1.4
+++ edge.module	11 Nov 2010 16:22:30 -0000
@@ -33,11 +33,23 @@ function edge_theme_registry_alter(&$cal
 
 /**
  * Implements hook_css_alter().
+ *
+ * Introduces new theme .info file properties:
+ * - stylesheets-override: A list of CSS file names to conditionally replace
+ *   with a theme-specific file whenever the original file is loaded.
+ * - stylesheets-remove: A list of CSS file names to never load.
+ *
+ * When used in combination by base themes and the current theme, the following
+ * logic applies:
+ * - The last override definition is used, unless a theme later in the stack
+ *   removes the file.
+ * - A file is removed, unless a theme later in the stack overrides it.
  */
 function edge_css_alter(&$css) {
   global $base_theme_info, $theme_info;
 
   $overrides = array();
+  $removals = array();
 
   // Handle .info file properties for base themes.
   if (!empty($base_theme_info)) {
@@ -47,27 +59,42 @@ function edge_css_alter(&$css) {
         $theme_overrides = _system_info_add_path($base_theme_info[$name]->info['stylesheets-override'], $base_theme_path);
         $overrides = array_merge($overrides, $theme_overrides);
       }
+      if (isset($base_theme->info['stylesheets-remove'])) {
+        $removals = array_merge($removals, array_flip($base_theme->info['stylesheets-remove']));
+      }
     }
   }
-  // Handle .info file properties for active theme.
+  // Handle .info file properties for the current theme.
   if (isset($theme_info->info['stylesheets-override'])) {
     $theme_path = dirname($theme_info->filename);
     $theme_overrides = _system_info_add_path($theme_info->info['stylesheets-override'], $theme_path);
     $overrides = array_merge($overrides, $theme_overrides);
   }
+  if (isset($theme_info->info['stylesheets-remove'])) {
+    $removals = array_merge($removals, array_flip($theme_info->info['stylesheets-remove']));
+
+    // Remove all 
+  }
 
-  if (!empty($overrides)) {
-    // $css is keyed by filename and may even additionally specify an alternate
-    // basename. The theme .info properties are always keyed by basename, so we
-    // have to manually compare each file like drupal_get_css() would.
+  if (!empty($overrides) || !empty($removals)) {
+//    // Both overrides and removals are keyed by basename.
     foreach ($css as $filename => $item) {
       if ($item['type'] == 'file') {
+        // Theme .info properties always use a file's basename, but items in
+        // $css are keyed either by filename or by an alternate basename.
+        // @see drupal_get_css()
         $basename = (isset($item['basename']) ? $item['basename'] : basename($item['data']));
         if (isset($overrides[$basename])) {
           $css[$filename]['data'] = $overrides[$basename];
         }
+        // Unless a file has been overridden, check whether it should be
+        // removed.
+        elseif (isset($removals[$basename])) {
+          unset($css[$filename]);
+        }
       }
     }
   }
+//  krumo($css);
 }
 
