Custom admin bar css on front end bug

You make it the wrong way.

First, you do double work. Enqueue inside enqueue. You don’t need wp_enqueue_scripts():

wp_enqueue_style(
    'color-admin-bar',
    PATH_TO_CSS,
    array( 'admin-bar' )
);

Second. Don’t use anonymous functions with WordPress Actions. Once-for-all-time is OK, but while the project is growing up you can collide with the inability to dequeue that style when you’ll want to.

The solution.

Make a copy of the admin-bar.css and correct it to fit your needs. Then minimize it using any tool you can google for (optionally).

Dequeue the original admin bar:

<?php
add_action('admin_init', 'my_remove_admin_bar');
function my_remove_admin_bar() {
    wp_dequeue_style('admin-bar')
}

And enqueue your new-laid my-admin-bar.css

Slight hitch. You can face the problem when the whole admin bar gets updated to the new look with the new WordPress version.

deneme bonusu veren sitelerbahis casinomakrobetceltabettipobet365pinbahispolobet