diff --git includes/common.inc includes/common.inc
index 9d2d6c2..28763b6 100644
--- includes/common.inc
+++ includes/common.inc
@@ -3502,8 +3502,13 @@ function _drupal_load_stylesheet($matches) {
   $filename = $matches[1];
   // Load the imported stylesheet and replace @import commands in there as well.
   $file = drupal_load_stylesheet($filename);
-  // Alter all url() paths, but not external.
-  return preg_replace('/url\(([\'"]?)(?![a-z]+:)([^\'")]+)[\'"]?\)?;/i', 'url(\1' . dirname($filename) . '/', $file);
+
+  // Determine the correct directory (we don't need . as current directory).
+  $directory = dirname($filename) == '.' ? '' : dirname($filename) .'/';
+
+  // Alter all url() paths, but not external. We don't need to normalize
+  // paths here (remove folder/... segements) because that will be done later.
+  return preg_replace('/url\s*\(([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1'. $directory, $file);
 }
 
 /**
