Recently, I’ve run into a situation where the CSS edit environment in the Customizer takes precedence over the external style.css file. I’ve not experienced this in GP until very recently. Mostly, but not exclusively, the precedence takes place with WooCommerce styles.
Is there a way I can prioritize so that the things so that style.css takes precedence over the Customizer stylesheet editor?
I tried the following, but without success:
add_action( ‘wp_enqueue_scripts’, ‘generate_remove_scripts’ );
function generate_remove_scripts()
{
wp_dequeue_style( ‘generate-child’ );
}
add_action( ‘wp_enqueue_scripts’, ‘generate_move_scripts’, 999 );
function generate_move_scripts()
{
if ( is_child_theme() ) :
wp_enqueue_style( ‘generate-child’, get_stylesheet_uri(), true, filemtime( get_stylesheet_directory() . ‘/style.css’ ), ‘all’ );
endif;
}
Thank you.