Index: wp-includes/post-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/post-template.php	(revision )
+++ wp-includes/post-template.php	(revision )
@@ -536,6 +536,28 @@
 			$classes[] = 'post-type-paged-' . $page;
 	}
 
+    /** Add child-theme-<Name> to default body classes */
+    if ( is_child_theme() ) {
+        $active_theme_css_url = get_stylesheet_directory() . '/style.css';
+        $active_theme_data = get_theme_data( $active_theme_css_url );
+        // set Name to lower case
+        $active_theme_slug = esc_attr( strtolower( $active_theme_data['Name'] ) );
+        // concatenate multiple word names by replacing spaces with hyphens
+        $active_theme_slug = preg_replace( '/\s\s+/', ' ', $active_theme_slug );
+        $active_theme_slug = preg_replace( '/\\040/', '-', $active_theme_slug );
+        $classes[] = 'child-theme-' . $active_theme_slug;
+    }
+
+    /** Add theme-<Name> to default body classes */
+    $parent_theme_css_url = get_template_directory() . '/style.css';
+    $parent_theme_data = get_theme_data( $parent_theme_css_url );
+    // set Name to lower case
+    $parent_theme_slug = esc_attr( strtolower( $parent_theme_data['Name'] ) );
+    // concatenate multiple word names by replacing spaces with hyphens
+    $parent_theme_slug = preg_replace( '/\s\s+/', ' ', $parent_theme_slug );
+    $parent_theme_slug = preg_replace( '/\\040/', '-', $parent_theme_slug );
+    $classes[] = 'theme-' . $parent_theme_slug;
+
 	if ( ! empty( $class ) ) {
 		if ( !is_array( $class ) )
 			$class = preg_split( '#\s+#', $class );
