diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc
index cda55b4..84334a0 100644
--- a/core/includes/ajax.inc
+++ b/core/includes/ajax.inc
@@ -275,7 +275,7 @@ function ajax_render($commands = array()) {
 
   $extra_commands = array();
   if (!empty($styles)) {
-    $extra_commands[] = ajax_command_prepend('head', $styles);
+    $extra_commands[] = ajax_command_add_css($styles);
   }
   if (!empty($scripts_header)) {
     $extra_commands[] = ajax_command_prepend('head', $scripts_header);
@@ -1204,3 +1204,25 @@ function ajax_command_restripe($selector) {
   );
 }
 
+/**
+ * Creates a Drupal Ajax 'add_css' command.
+ *
+ * This method will add css via ajax in a cross-browser compatible way.
+ *
+ * This command is implemented by Drupal.ajax.prototype.commands.add_css()
+ * defined in misc/ajax.js.
+ *
+ * @param $styles
+ *   A string that contains the styles to be added.
+ *
+ * @return
+ *   An array suitable for use with the ajax_render() function.
+ *
+ * @see misc/ajax.js
+ */
+function ajax_command_add_css($styles) {
+  return array(
+    'command' => 'add_css',
+    'data' => $styles,
+  );
+}
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index 92eefea..1507882 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -616,6 +616,22 @@ Drupal.ajax.prototype.commands = {
       .removeClass('odd even')
       .filter(':even').addClass('odd').end()
       .filter(':odd').addClass('even');
+  },
+  /**
+   * Command to add css.
+   * Use the proprietary addImport method if available as browsers which support that method ignore
+   * @import statements in dynamically added stylesheets.
+   */
+  add_css: function (ajax, response, status) {
+    // Add the styles in the normal way.
+    $('head').prepend(response.data);
+    // Add imports in the styles using the addImport method if available.
+    if (document.styleSheets[0].addImport) {
+      importMatch = /@import\s+(?:url\()?['"]?(\S*?)['"]?(?:\))?( \w+)*;/gi ;
+      while (match = importMatch.exec(response.data)) {
+        document.styleSheets[0].addImport(match[1]);
+      }
+    }
   }
 };
 
