I want to apply my valid custom admin bar color scheme to front-end toolbar.
I am using this code to do it:
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style(
'color-admin-bar',
PATH_TO_CSS,
array( 'admin-bar' )
);
} );
However it causes some strange bugs.
For example, when I hover a button it is colored with deep blue which is ok. But when it loses hover for 1 second it changes back to original color cheme (black background and blue text color).
I guess this is happening because of the default admin bar stylesheet:
<link rel='stylesheet' id='admin-bar-css' href='http://neuralnet.info.loc/wp-includes/css/admin-bar.min.css?ver=4.8' type='text/css' media='all' />
But I can't turn it off because whole toolbar layout gets broken.
So how to properly replace admin bar color scheme in front-end?
UPD
I did look in admin-bar.css and it seems that it is a bit different from back-end admin bar...