This appears to be the case with built in blocks at the moment. If you use them with default Twenty Nineteen theme you get the same look in both backend and frontend
When building custom theme, should we make sure blocks are identical in both cases? It seems that this requires loading the same CSS frameworks and JS in back-end and front-end
This appears to be the case with built in blocks at the moment. If you use them with default Twenty Nineteen theme you get the same look in both backend and frontend
When building custom theme, should we make sure blocks are identical in both cases? It seems that this requires loading the same CSS frameworks and JS in back-end and front-end
Ideally, yes. Blocks are supposed to be WYSIWYG. See the Editor Styles section of the Gutenberg Handbook for how to load theme styles in the editor.
You need to add an editor stylesheet with add_editor_style()
, the same way you did with the previous editor, but to support the block editor you need to declare theme support for editor styles:
add_theme_support( 'editor-styles' );