Admin CSS Targeting Global WP Elements
-
Hi there,
It looks like some of the CSS in assets/css/fsdt-backend.css is not targeting your fsdt-wrap so the styles get applied globally. For example:
.nav-tab-wrapper,
.wrap h2.nav-tab-wrapper,
h1.nav-tab-wrapper {
background-color: #fff;
border-bottom: 1px solid #eeeeee;
margin: 0;
padding-top: 0px;
padding-bottom: 0;
line-height: inherit;
border-top: none;
}This coded causes display issues with tabs added by other themes/plugins and WP core.
Ideally, the
fsdt-backend.cssfile should only be loaded on specific admin pages where it’s needed. Currently, it is being enqueued across the entire admin area via theregister_fsdt_admin_assetsfunction.To improve performance and reduce the risk of conflicts, it’s recommended to add a conditional check at the top of that function using the
$hook_suffixparameter. This ensures that the styles are only loaded on relevant admin screens.You can refer to the WordPress Codex for more details on targeting specific admin pages.
- AJ
ps: I’m not using your plugin, but I noticed the issue on a customer’s site.
The topic ‘Admin CSS Targeting Global WP Elements’ is closed to new replies.