TannerRitchie Web Applications

Advanced Web Application Development in the GTHA

Fix WordPress dashboard display error in Chrome

AScreenshot from 2015-09-05 12:38:16n annoying bug causes the WordPress dashboard menu to be messed up in Chrome. See image to the left.

This appears to be a Chrome/Webkit bug that Google are not in a rush to fix.

To fix in your WordPress theme code, add the following to functions.php:

function chromefix_inline_css(){ 
       wp_add_inline_style( 'wp-admin', '#adminmenu { transform: translateZ(0); }' );
}

add_action('admin_enqueue_scripts', 'chromefix_inline_css');

You can apparently (not tested) fix globally in your copy of Chrome by using the following:

  • Go to chrome://flags/#disable-slimming-paint
  • Enable the “Disable slimming paint” option.
  • Ensure that the “Enable slimming paint” option below it is not turned on.
  • Relaunch Chrome.