[Support request] Page title in Gutenberg Editor – Unreadable due to colour

Home Forums Support [Support request] Page title in Gutenberg Editor – Unreadable due to colour

Home Forums Support Page title in Gutenberg Editor – Unreadable due to colour

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #948372
    Dwayne

    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.

    https://imgur.com/a/hN1EIva

    .editor-post-title__block .editor-post-title__input {
    color: #
    }

    This gets inherited from GP’s color setting. But, not via CSS.

    #948407
    Tom
    Lead Developer
    Lead Developer

    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' );

    #948988
    Dwayne

    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.

    #949135
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #1343574
    Maryse

    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.

    #1343824
    Tom
    Lead Developer
    Lead Developer

    Nice catch!

    Was your post title un-readable using the latest GP version?

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.