Fix Weird Hover Border in WordPress 5.7 Admin Menu

I’ve been testing the beta for WordPress 5.7. So far no complaints but there is one weird thing it looks like they are adding, some weird 4-pixel width border that displays when you hover over any item(s) on the main WordPress menu. It’s even got a transition animation to make it feel extra wonky. Here is a screenshot for those who have not yet had the pleasure of experiencing the new stylez (look on the left-hand side of the menu, […]


This content originally appeared on Perishable Press and was authored by Jeff Starr

I’ve been testing the beta for WordPress 5.7. So far no complaints but there is one weird thing it looks like they are adding, some weird 4-pixel width border that displays when you hover over any item(s) on the main WordPress menu. It’s even got a transition animation to make it feel extra wonky. Here is a screenshot for those who have not yet had the pleasure of experiencing the new stylez (look on the left-hand side of the menu, blue border appears on hover for every menu item):

Weird hover border on WP menu linksSloppy unnecessary obtrusive hover border on WP menu links

I have no idea why anyone would think this is a good idea or even necessary. Although obviously someone seems to think so. Honestly I don’t care. I just want to fix it, because it’s a clunky dumb feeling that distracts from normal menu navigation. You know, the menu navigation that’s been working great for years now, for millions and millions of users. I can’t roll my eyeballs hard enough here.

Code fix

So for anyone who wants to disable the new awkward side-border hover styles, just add this code to your theme (or child theme) functions.php file, or grab a copy of the same code as a simple plugin below.

// add style for wp menu
function shapeSpace_wp_menu_styles() {
	echo '<style>#adminmenu a:focus, #adminmenu a:hover, .folded #adminmenu .wp-submenu-head:hover { box-shadow: none !important; }</style>';
}
add_action('admin_head', 'shapeSpace_wp_menu_styles');

What is this code doing. It is adding a line of CSS to the Admin Area. The CSS simply removes the annoying 4px-width box-shadow that is responsible for displaying the odd side border. One rule and done.

Of course, there is no need to add the code manually if you would rather use a simple, free plugin to do the job..

Download plugin

To make life easier, you can download the above code solution as a simple plugin:

Remove Menu Hover Border Version 1.0 (876B zip)

Install, activate, and say “hello” again to clean, unobtrusive menu navigation styles.



This content originally appeared on Perishable Press and was authored by Jeff Starr


Print Share Comment Cite Upload Translate Updates
APA

Jeff Starr | Sciencx (2021-02-06T19:16:49+00:00) Fix Weird Hover Border in WordPress 5.7 Admin Menu. Retrieved from https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/

MLA
" » Fix Weird Hover Border in WordPress 5.7 Admin Menu." Jeff Starr | Sciencx - Saturday February 6, 2021, https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/
HARVARD
Jeff Starr | Sciencx Saturday February 6, 2021 » Fix Weird Hover Border in WordPress 5.7 Admin Menu., viewed ,<https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/>
VANCOUVER
Jeff Starr | Sciencx - » Fix Weird Hover Border in WordPress 5.7 Admin Menu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/
CHICAGO
" » Fix Weird Hover Border in WordPress 5.7 Admin Menu." Jeff Starr | Sciencx - Accessed . https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/
IEEE
" » Fix Weird Hover Border in WordPress 5.7 Admin Menu." Jeff Starr | Sciencx [Online]. Available: https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/. [Accessed: ]
rf:citation
» Fix Weird Hover Border in WordPress 5.7 Admin Menu | Jeff Starr | Sciencx | https://www.scien.cx/2021/02/06/fix-weird-hover-border-in-wordpress-5-7-admin-menu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.