Archived topic
Page title in Gutenberg Editor - Unreadable due to colour
5 replies · Started by Dwayne on July 3, 2019
So, it seems the colour can be changed by setting 'Content Title' in the Color Customization section.
However, if it's set to white (depending on site design) it becomes unreadable in the Gutenberg Editor.
.editor-post-title__block .editor-post-title__input {
color: #
}
This gets inherited from GP's color setting. But, not via CSS.
Hi there,
Are your heading colors set to white in the Customizer?
Your content title in the editor will use the H1 color if the content title color isn't set.
If you'd like to remove styling from the editor, you can do this:
add_filter( 'generate_show_block_editor_styles', '__return_false' );
Yes, the site requires white heading colors as set in the customizer.
Is there a way to not remove *all* styling from the editor?
I just don't want the page title to be invisible on the backend.
Give this PHP a shot:
add_action( 'enqueue_block_editor_assets', function() {
$css = '.editor-post-title__block .editor-post-title__input {color: black;}';
wp_add_inline_style( 'generate-block-editor-styles', $css );
}, 20 );
Let me know :)
It works, thank you, Tom. I don't know PHP, but I think there are too many ' in ''generate-block-editor-styles'.
It worked for me when I removed one at the beginning, otherwise I got an error.
Nice catch!
Was your post title un-readable using the latest GP version?
Thanks!