diff --git a/core/lib/Drupal/Core/Asset/CssOptimizer.php b/core/lib/Drupal/Core/Asset/CssOptimizer.php
index 1090d5a..169634b 100644
--- a/core/lib/Drupal/Core/Asset/CssOptimizer.php
+++ b/core/lib/Drupal/Core/Asset/CssOptimizer.php
@@ -101,6 +101,9 @@ public function loadFile($file, $optimize = NULL, $reset_basepath = TRUE) {
     // Set the current base path to process possible child imports.
     $basepath = dirname($file);
 
+    // Remove any query strings in the import if the file is local.
+    $file = explode('?', $file)[0];
+
     // Load the CSS stylesheet. We suppress errors because themes may specify
     // stylesheets in their .info.yml file that don't exist in the theme's path,
     // but are merely there to disable certain module CSS files.
diff --git a/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css b/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css
index 34270ee..fa21d24 100644
--- a/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css
+++ b/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css
@@ -2,6 +2,7 @@
 
 @import "import1.css";
 @import "import2.css";
+@import "import3.css?because-sometimes-this-is-added";
 @import url("http://example.com/style.css");
 @import url("//example.com/style.css");
 
diff --git a/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css.optimized.css b/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css.optimized.css
index 16bd93b..fce5ead 100644
--- a/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css.optimized.css
+++ b/core/tests/Drupal/Tests/Core/Asset/css_test_files/css_input_with_import.css.optimized.css
@@ -1,5 +1,6 @@
 ul,select{font:1em/160% Verdana,sans-serif;color:#494949;}.ui-icon{background-image:url(images/icon.png);}.data .double-quote{background-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");}.data .single-quote{background-image:url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDACAWGBwYFCAcGhwkIiAmMFA0MCwsMGJGSjpQdGZ6eHJmcG6AkLicgIiuim5woNqirr7EztDOfJri8uDI8LjKzsb/2wBDASIkJDAqMF40NF7GhHCExsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsb/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AKAAH//Z');}.data .no-quote{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAEAQAAAAAo/mtHAAAAIElEQVQIHWMRnWHwcRNLN8NZ7QYWwT8PlBlYsgqVBRsAankIMw5MtnoAAAAASUVORK5CYII=);}
 p,select{font:1em/160% Verdana,sans-serif;color:#494949;}
+p.blue{color:blue;}
 @import url("http://example.com/style.css");@import url("//example.com/style.css");body{margin:0;padding:0;background:#edf5fa;font:76%/170% Verdana,sans-serif;color:#494949;}.this .is .a .test{font:1em/100% Verdana,sans-serif;color:#494949;}.this
 .is
 .a
diff --git a/core/tests/Drupal/Tests/Core/Asset/css_test_files/import3.css b/core/tests/Drupal/Tests/Core/Asset/css_test_files/import3.css
new file mode 100644
index 0000000..c7bc513
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/Asset/css_test_files/import3.css
@@ -0,0 +1,3 @@
+p.blue {
+  color: blue;
+}
