admin管理员组文章数量:1122832
I modified a theme so that the text on the front end is where I want it. The back end text in the editor is appearing smaller than the front end. I was able to find a setting under the .editor-styles-wrapper
for --font-size-base
where it was at 15px, and if I modified it in my inspector to 18px, that matches the front end the way I want it to when using the post editor.
The problem is I do not know where or how I need to set this to make it permanent with the theme. The back end is picking up the fonts from my front end, no problem, but I'd like to make sure the font-size setting is kept. Can I add this in the functions.php
section under Appearance > Site Editor with some PHP and styling? I'm running on Mai Delight which runs on Genesis, if that gives any clues to people. Thanks for any advice!
I modified a theme so that the text on the front end is where I want it. The back end text in the editor is appearing smaller than the front end. I was able to find a setting under the .editor-styles-wrapper
for --font-size-base
where it was at 15px, and if I modified it in my inspector to 18px, that matches the front end the way I want it to when using the post editor.
The problem is I do not know where or how I need to set this to make it permanent with the theme. The back end is picking up the fonts from my front end, no problem, but I'd like to make sure the font-size setting is kept. Can I add this in the functions.php
section under Appearance > Site Editor with some PHP and styling? I'm running on Mai Delight which runs on Genesis, if that gives any clues to people. Thanks for any advice!
1 Answer
Reset to default 0Without knowing your exact setup, this is hard to say, but it looks like some code is adding styling that overrules some parts of your theme's styles. You could try adding !important
to that font size and see what happens.
Otherwise, you could copy that line that works in the inspector into your theme's functions.php
like this:
add_action('admin_head', 'wpse426010_custom_admin_styles', 999);
function wpse426010_custom_admin_styles() {
echo '<style>
... your style here
</style>';
}
Note the high priority of the function to make sure this style is added after everything else.
Beware that this hack will be specific to your current setup. Because it is likely the unintended consequence of some code, it could stop working when that code (Mai Delight, Genesis or some plugin) is updated.
本文标签: admin cssHow do I modify the fontsizebase used on editorstyleswrapper on the back end
版权声明:本文标题:admin css - How do I modify the font-size-base used on editor-styles-wrapper on the back end? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300977a1931018.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论