My WordPress plugin uses Chosen Select and is supposed to use the css file at my-plugin/assets/resources/chosen.min.css
.
Unfortunately, when another plugin also uses Chosen Select, my plugin has a tendency to grab styles from the other css file instead.
For example, it's currently getting styles from yith-woocommerce-ajax-search/plugin-fw/assets/css/chosen/chosen.css
which messes up all my custom styling.
What's the best way to make sure an installation of Chosen Select (or other common things that have their own syling) doesn't get styles from other css files?
Here's how I register the stylesheet.
function lsmi_load_admin_script() {
wp_register_style( 'chosencss', plugins_url( 'assets/resources/chosen.min.css', __FILE__ ), true, '', 'all' );
wp_enqueue_style( 'chosencss' );
}