diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 253bcca800..92f35e035f 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -1658,13 +1658,32 @@ class WP_List_Table {
 	 * @return string[] Array of CSS classes for the table tag.
 	 */
 	protected function get_table_classes() {
-		$mode = get_user_setting( 'posts_list_mode', 'list' );
+	    global $mode;
+
+	    // Sanitize the mode class name
+	    $mode_class = esc_attr( 'table-view-' . $mode );
+
+	    // Get the post type
+	    $post_type = $this->screen->post_type;
 
-		$mode_class = esc_attr( 'table-view-' . $mode );
+	    // Sanitize the post type class name
+	    $post_type_class = esc_attr( 'post-type-' . $post_type );
 
-		return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
+	    // Determine if the post type is hierarchical
+	    $post_type_hierarchical_class = is_post_type_hierarchical( $post_type ) ? 'pages' : 'posts';
+
+	    // Return the array of classes
+	    return array(
+	        'widefat',
+	        'fixed',
+	        'striped',
+	        $mode_class,
+	        $post_type_class,
+	        $post_type_hierarchical_class,
+	    );
 	}
 
+
 	/**
 	 * Generates the table navigation above or below the table
 	 *
