Applying styles to Gutenberg block editor
-
Trying to load a custom style sheet to tweak the Gutenberg block editor. I have a child theme active and I’ve verified the child theme functions.php is loading successfully. I stripped it down to just the following to try to isolate the issue:
<?php function generate_child_setup() { add_theme_support('editor-styles'); add_editor_style('block-editor.css'); } add_action('after_setup_theme', 'generate_child_setup');
Both the functions.php and block-editor.css file are in the root of my child theme folder.
The only content of the block-editor.css file is a single CSS rule:
.edit-post-layout__content {padding-left:25px !important;}
However, it doesn’t seem like the block-editor.css is getting loaded when editing a post.
My end goal is to add 25px of padding to the left of the content. It’s to address an issue where blocks to the far left within a full-width block have their move handle obscured.
Thanks for any help you can pass along.
- The topic ‘Applying styles to Gutenberg block editor’ is closed to new replies.