What the title says – this snippet will enqueue your child theme’s stylesheet into the block editor so you can preview changes in real time.
add_filter('generate_editor_styles', function($editor_styles) {
$editor_styles[] = '/style.css';
return $editor_styles;
}, 50);Credit: Alvind with GeneratePress support.
This next snippet will also enqueue your CSS from “Additional CSS” in the Customizer. (credit GP site)
add_filter( 'block_editor_settings_all', function( $editor_settings ) {
$css = wp_get_custom_css_post()->post_content;
$editor_settings['styles'][] = array( 'css' => $css );
return $editor_settings;
} );
Alternate method to get Additional CSS into the editor: https://generatepress.com/forums/topic/changing-default-colors-in-color-picker/#post-1686999