diff --git a/core/includes/common.inc b/core/includes/common.inc
index d21b9ce..2001b67 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2646,9 +2646,20 @@ function drupal_add_css($data = NULL, $options = NULL) {
         // key as $data could be a very long string of CSS.
         $css[] = $options;
         break;
+
+      case 'file':
+        // Local CSS files are keyed by basename; if a file with the same
+        // basename is added more than once, it gets overridden.
+        // By default, take over the filename as basename.
+        if (!isset($options['basename'])) {
+          $options['basename'] = drupal_basename($data);
+        }
+        $css[$options['basename']] = $options;
+        break;
+
       default:
-        // Local and external files must keep their name as the associative key
-        // so the same CSS file is not be added twice.
+        // External files are keyed by their full URI, so the same CSS file is
+        // not added twice.
         $css[$data] = $options;
     }
   }
@@ -2686,6 +2697,8 @@ function drupal_add_css($data = NULL, $options = NULL) {
  * @see drupal_add_css()
  */
 function drupal_get_css($css = NULL, $skip_alter = FALSE) {
+  global $theme_info;
+
   if (!isset($css)) {
     $css = drupal_add_css();
   }
@@ -2698,17 +2711,12 @@ function drupal_get_css($css = NULL, $skip_alter = FALSE) {
   // Sort CSS items, so that they appear in the correct order.
   uasort($css, 'drupal_sort_css_js');
 
-  // Remove the overridden CSS files. Later CSS files override former ones.
-  $previous_item = array();
-  foreach ($css as $key => $item) {
-    if ($item['type'] == 'file') {
-      // If defined, force a unique basename for this file.
-      $basename = isset($item['basename']) ? $item['basename'] : drupal_basename($item['data']);
-      if (isset($previous_item[$basename])) {
-        // Remove the previous item that shared the same base name.
-        unset($css[$previous_item[$basename]]);
+  // Allow themes to conditionally override module CSS files by basename.
+  if (!empty($theme_info->stylesheets_override)) {
+    foreach ($css as $key => $options) {
+      if (isset($options['basename']) && isset($theme_info->stylesheets_override[$options['basename']])) {
+        $css[$key]['data'] = $theme_info->stylesheets_override[$options['basename']];
       }
-      $previous_item[$basename] = $key;
     }
   }
 
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 7766952..34cd279 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -132,6 +132,10 @@ function _drupal_theme_initialize($theme, $base_theme = array(), $registry_callb
   // We work it this way so that we can have child themes override parent
   // theme stylesheets easily.
   $final_stylesheets = array();
+  // List of CSS file basenames to override, pointing to the theme name that
+  // holds the final override.
+  // @todo Try to prepare this in _system_rebuild_theme_data() already.
+  $theme->stylesheets_override = array();
 
   // Grab stylesheets from base theme
   foreach ($base_theme as $base) {
@@ -142,6 +146,12 @@ function _drupal_theme_initialize($theme, $base_theme = array(), $registry_callb
         }
       }
     }
+    if (!empty($base->info['stylesheets-override'])) {
+      $base_theme_path = dirname($base->filename);
+      foreach ($base->info['stylesheets-override'] as $basename) {
+        $theme->stylesheets_override[$basename] = $base_theme_path . '/' . $basename;
+      }
+    }
   }
 
   // Add stylesheets used by this theme.
@@ -152,6 +162,11 @@ function _drupal_theme_initialize($theme, $base_theme = array(), $registry_callb
       }
     }
   }
+  if (!empty($theme->info['stylesheets-override'])) {
+    foreach ($theme->info['stylesheets-override'] as $basename) {
+      $theme->stylesheets_override[$basename] = $theme_path . '/' . $basename;
+    }
+  }
 
   // And now add the stylesheets properly
   foreach ($final_stylesheets as $media => $stylesheets) {
diff --git a/core/modules/color/color.module b/core/modules/color/color.module
index d4ca6ca..ca6851b 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module
@@ -67,7 +67,6 @@ function _color_html_alter(&$vars) {
   // Override stylesheets.
   $color_paths = variable_get('color_' . $theme_key . '_stylesheets', array());
   if (!empty($color_paths)) {
-
     foreach ($themes[$theme_key]->stylesheets['all'] as $base_filename => $old_path) {
       // Loop over the path array with recolored CSS files to find matching
       // paths which could replace the non-recolored paths.
@@ -77,7 +76,7 @@ function _color_html_alter(&$vars) {
         if (drupal_basename($old_path) == drupal_basename($color_path)) {
           // Replace the path to the new css file.
           // This keeps the order of the stylesheets intact.
-          $vars['css'][$old_path]['data'] = $color_path;
+          $vars['css'][drupal_basename($old_path)]['data'] = $color_path;
         }
       }
     }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
index d8748bc..80ce817 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
@@ -78,8 +78,11 @@ class FrameworkTest extends AjaxTestBase {
       'css' => drupal_get_path('module', 'system') . '/system.admin.css',
       'js' => drupal_get_path('module', 'system') . '/system.js',
     );
+    // CSS files are stored by basename, see drupal_add_css().
+    $expected_css_basename = drupal_basename($expected['css']);
+
     // @todo D8: Add a drupal_css_defaults() helper function.
-    $expected_css_html = drupal_get_css(array($expected['css'] => array(
+    $expected_css_html = drupal_get_css(array($expected_css_basename => array(
       'type' => 'file',
       'group' => CSS_DEFAULT,
       'weight' => 0,
@@ -135,7 +138,7 @@ class FrameworkTest extends AjaxTestBase {
 
     // Verify the expected CSS file was added, both to Drupal.settings, and as
     // an AJAX command for inclusion into the HTML.
-    $this->assertEqual($new_css, $original_css + array($expected['css'] => 1), t('Page state now has the %css file.', array('%css' => $expected['css'])));
+    $this->assertEqual($new_css, $original_css + array($expected_css_basename => 1), t('Page state now has the %css file.', array('%css' => $expected['css'])));
     $this->assertCommand($commands, array('data' => $expected_css_html), t('Page now has the %css file.', array('%css' => $expected['css'])));
 
     // Verify the expected JS file was added, both to Drupal.settings, and as
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
index 9421682..ea16ef2 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
@@ -36,16 +36,13 @@ class CascadingStylesheetsTest extends WebTestBase {
   }
 
   /**
-   * Check default stylesheets as empty.
+   * Tests adding stylesheet files.
    */
-  function testDefault() {
+  function testAdd() {
+    // Check default stylesheets as empty.
     $this->assertEqual(array(), drupal_add_css(), t('Default CSS is empty.'));
-  }
 
-  /**
-   * Test that stylesheets in module .info files are loaded.
-   */
-  function testModuleInfo() {
+    // Test that stylesheets in module .info files are loaded.
     $this->drupalGet('');
 
     // Verify common_test.css in a STYLE media="all" tag.
@@ -61,38 +58,26 @@ class CascadingStylesheetsTest extends WebTestBase {
       ':filename' => 'tests/modules/common_test/common_test.print.css',
     ));
     $this->assertTrue(count($elements), "Stylesheet with media 'print' in module .info file found.");
-  }
 
-  /**
-   * Tests adding a file stylesheet.
-   */
-  function testAddFile() {
+    // Tests adding a file stylesheet.
     $path = drupal_get_path('module', 'simpletest') . '/simpletest.css';
     $css = drupal_add_css($path);
-    $this->assertEqual($css[$path]['data'], $path, t('Adding a CSS file caches it properly.'));
-  }
+    $this->assertEqual($css[drupal_basename($path)]['data'], $path, t('Adding a CSS file caches it properly.'));
 
-  /**
-   * Tests adding an external stylesheet.
-   */
-  function testAddExternal() {
+    // Tests adding an external stylesheet.
     $path = 'http://example.com/style.css';
     $css = drupal_add_css($path, 'external');
     $this->assertEqual($css[$path]['type'], 'external', t('Adding an external CSS file caches it properly.'));
-  }
 
-  /**
-   * Makes sure that reseting the CSS empties the cache.
-   */
-  function testReset() {
+    // Makes sure that reseting the CSS empties the cache.
     drupal_static_reset('drupal_add_css');
     $this->assertEqual(array(), drupal_add_css(), t('Resetting the CSS empties the cache.'));
   }
 
   /**
-   * Tests rendering the stylesheets.
+   * Tests stylesheet rendering.
    */
-  function testRenderFile() {
+  function testRender() {
     $css = drupal_get_path('module', 'simpletest') . '/simpletest.css';
     drupal_add_css($css);
     $styles = drupal_get_css();
@@ -101,12 +86,8 @@ class CascadingStylesheetsTest extends WebTestBase {
     $query_string = variable_get('css_js_query_string', '0');
     $css_processed = "<style media=\"all\">\n@import url(\"" . check_plain(file_create_url($css)) . "?" . $query_string ."\");\n</style>";
     $this->assertEqual(trim($styles), $css_processed, t('Rendered CSS includes newlines inside style tags for JavaScript use.'));
-  }
 
-  /**
-   * Tests rendering an external stylesheet.
-   */
-  function testRenderExternal() {
+    // Tests rendering an external stylesheet.
     $css = 'http://example.com/style.css';
     drupal_add_css($css, 'external');
     $styles = drupal_get_css();
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.info b/core/modules/system/tests/themes/test_theme/test_theme.info
index b5d1bfc..f4332e9 100644
--- a/core/modules/system/tests/themes/test_theme/test_theme.info
+++ b/core/modules/system/tests/themes/test_theme/test_theme.info
@@ -13,6 +13,6 @@ hidden = TRUE
 ; here in order for a test to ensure that this correctly prevents the module
 ; version from being loaded, and that errors aren't caused by the lack of this
 ; file within the theme folder.
-stylesheets[all][] = system.base.css
+stylesheets-override[] = system.base.css
 
 settings[theme_test_setting] = default value
diff --git a/core/themes/seven/seven.info b/core/themes/seven/seven.info
index 969f749..c3b7b37 100644
--- a/core/themes/seven/seven.info
+++ b/core/themes/seven/seven.info
@@ -5,6 +5,9 @@ version = VERSION
 core = 8.x
 stylesheets[screen][] = reset.css
 stylesheets[screen][] = style.css
+stylesheets-override[] = vertical-tabs.css
+stylesheets-override[] = vertical-tabs-rtl.css
+stylesheets-override[] = jquery.ui.theme.css
 settings[shortcut_module_link] = 1
 regions[content] = Content
 regions[help] = Help
diff --git a/core/themes/seven/template.php b/core/themes/seven/template.php
index a8643ab..ae6b26b 100644
--- a/core/themes/seven/template.php
+++ b/core/themes/seven/template.php
@@ -98,20 +98,3 @@ function seven_tablesort_indicator($variables) {
     return theme('image', array('uri' => $theme_path . '/images/arrow-desc.png', 'alt' => t('sort descending'), 'width' => 13, 'height' => 13, 'title' => t('sort descending')));
   }
 }
-
-/**
- * Implements hook_css_alter().
- */
-function seven_css_alter(&$css) {
-  // Use Seven's vertical tabs style instead of the default one.
-  if (isset($css['core/misc/vertical-tabs.css'])) {
-    $css['core/misc/vertical-tabs.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs.css';
-  }
-  if (isset($css['core/misc/vertical-tabs-rtl.css'])) {
-    $css['core/misc/vertical-tabs-rtl.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs-rtl.css';
-  }
-  // Use Seven's jQuery UI theme style instead of the default one.
-  if (isset($css['core/misc/ui/themes/base/jquery.ui.theme.css'])) {
-    $css['core/misc/ui/themes/base/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') . '/jquery.ui.theme.css';
-  }
-}
