Index: wp-includes/class.wp-styles.php
===================================================================
--- wp-includes/class.wp-styles.php	(revision 25649)
+++ wp-includes/class.wp-styles.php	(working copy)
@@ -109,22 +109,35 @@
 		return $this->add_data( $handle, 'after', $after );
 	}
 
+	/**
+	 * Either return or print the enqueued extra CSS. If the extra CSS
+	 * isn't wrapped in <style> tags, do that before returning or echoing it.
+	 *
+	 * @since 3.3
+	 *
+	 * @param string $handle The handle that we are checking for extra CSS.
+	 * @param bool $echo Whether we want the style echoed or returned.
+	 * @return string|bool False if there are no inline styles, or the string otherwise.
+	 */
 	function print_inline_style( $handle, $echo = true ) {
-		$output = $this->get_data( $handle, 'after' );
+		$inline_styles = $this->get_data( $handle, 'after' );
 
-		if ( empty( $output ) )
+		if ( empty( $inline_styles ) )
 			return false;
 
-		$output = implode( "\n", $output );
+		$output = '';
+		foreach ( $inline_styles as $inline_style ) {
+			// If it doesn't contain an opening or closing style tag, add them.
+			if ( ! ( preg_match( '#<style[^>]*>#i', $inline_style ) && preg_match( '#</style>#i', $inline_style ) ) ) {
+				$inline_style = sprintf( "<style type='text/css'>\n%s\n</style>", $inline_style );
+			}
+			$output .= $inline_style . "\n";
+		}
 
-		if ( !$echo )
-			return $output;
+		if ( $echo )
+			echo $output;
 
-		echo "<style type='text/css'>\n";
-		echo "$output\n";
-		echo "</style>\n";
-
-		return true;
+		return $output;
 	}
 
 	function all_deps( $handles, $recursion = false, $group = false ) {
