WordPress: Add page name to body class

This little snipped will add the page slug to the body class.
Copy the code below to your functions.php theme file:
add_filter( 'body_class', 'csm_add_slug_body_class' );
function csm_add_slug_body_class( $classes ) {
	global $post;
	if ( isset( $post ) ) {
		$classes[] = $post->post_type . '-' . $post->post_name;
	}
		return $classes;
}