Local stylesheets out of order
-
Hello,
I have experienced this issue in the past with some websites but this time it has frustrated me quite a bit and I’m looking to find a solution moving forward as I love the plugin otherwise.
We load our theme’s styles via a hook on “wp_enqeue_scripts”
A partial from the function:
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/bootstrap/css/bootstrap.min.css', array(), '3.2' ); wp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', array(), '3.2' ); // Load our main stylesheet. wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array('bootstrap'), '1.0.1' );
The issue is that bootstrap CSS is loaded after our theme-style, essentially overriding several styles. I added the bootstrap dependency in an effort to fix it, no change. Also, I temporarily unhooked the load of the font-awesome external style, no change.
From a comparison in our staging environment, the autoptimize aggregated CSS shows the theme-style at :1 and bootstrap at :37
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Local stylesheets out of order’ is closed to new replies.