This simple script will allow you to enqueue your child theme stylesheet into the Gutenberg editor so you can see your custom CSS while editing.
add_filter( ‘generate_editor_styles’, function( $editor_styles ) {
$editor_styles[] = ‘style.css’;
return $editor_styles;
} );
Note: In my child theme, the css file is named 'style.css'
. If you have a different name for your child theme, you’ll need to place that in the code above where it says "/style.css"
.