Created
April 9, 2020 10:42
-
-
Save wpgaurav/7fc6909dc606f5d0580637134888fbcd to your computer and use it in GitHub Desktop.
Hook/Add a custom editor.css file to Gutenberg Block editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( | |
'enqueue_block_editor_assets', | |
function () { | |
$theme = wp_get_theme(); | |
wp_enqueue_style( | |
'gt-main-editor-styles', | |
get_stylesheet_directory_uri() . '/custom-editor.css', | |
[], | |
$theme->get( 'Version' ) | |
); | |
} | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basic custom-editor.css file can have;
.editor-post-title__block .editor-post-title__input, .wp-block, h1, h2, h3, h4, h5, h6, p{ font-family: system-ui, Helvetica, Arial, sans-serif; } .wp-block, p{ font-size: 20px }