admin管理员组文章数量:1130349
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
Share Improve this question asked Dec 20, 2018 at 18:18 user1089548user1089548 1211 silver badge3 bronze badges1 Answer
Reset to default 1Ideally, 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' );
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
Share Improve this question asked Dec 20, 2018 at 18:18 user1089548user1089548 1211 silver badge3 bronze badges1 Answer
Reset to default 1Ideally, 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' );
本文标签: Are gutenberg blocks ideally supposed to look the same in both backend and frontend
版权声明:本文标题:Are gutenberg blocks ideally supposed to look the same in both back-end and front-end? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749079878a2312882.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论