[Resolved] Remove editor-typography.css from editor

Home Forums Support [Resolved] Remove editor-typography.css from editor

Home Forums Support Remove editor-typography.css from editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2289881
    Matthias

    Is there a way to remove the “editor-typography.css” from the editor?

    This stylesheet is injected as inline css here: (block-editor.php (line 140)):

    if ( generate_is_using_dynamic_typography() ) {
      wp_add_inline_style( 'wp-edit-blocks', wp_strip_all_tags( GeneratePress_Typography::get_css( 'core', 'editor' ) ) );
    }

    The reason I want to remove it is because the styles override the custom rules I specified in my theme.json file:

    css rules

    I’ve read that I can override editor-typography.css in my child theme. So I could just create an empty stylesheet and load that.

    Just wondering if there’s a better/cleaner way to do this 🙂

    #2290414
    David
    Staff
    Customer Support

    Hi there,

    i think for now, the easiest way is to use the empty stylesheet.
    Removing style that was added to the array using wp_add_inline_style looks to be a right pain.

    #2290535
    Matthias

    That worked, thank you!

    #2290538
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.