Just to make a test, in order to simulate the plugin behaviour I’ve tried to put all the css loaded by my website in a single CSS respecting the order in which they appearead in the <head> without the Combine CSS feature enabled. I’ve replaced this custom combined css with the one created by SG Optimizer and the issue is solved.
My question is, Does SG Optimizer respect the original order when it combines CSS?
Best regards
At the end I was able to solve the issue by myself after reading other posts in the support section.
Basically the issue was related to a CSS file to be used only in case of Internet Explorer 9 browser. This stylesheet of WPBakery didn’t show up in SG Optimizer exclude list and thanks to this function put in my functions.php
add_filter( ‘sgo_css_combine_exclude’, ‘css_combine_exclude’ );
function css_combine_exclude( $exclude_list ) {
// Add the style handle to exclude list.
$exclude_list[] = ‘vc_lte_ie9′;
return $exclude_list;
}
I was able to exclude it.
Pay attention in the HTML header to styles like the following
<!–[if lt IE 9]><link rel=’stylesheet’ id=’vc_lte_ie9-css’ href=’https://www.website.com/wp-content/plugins/js_composer/assets/css/vc_lte_ie9.min.css’ type=’text/css’ media=’screen’ /> <![endif]–>
This style if it doesn’t show up in SG Optimizer could be combined by the plugin and could become active in your CSS breaking the layout.
And finally yes, SG Optimizer respects the original order when it combines CSS
-
This reply was modified 6 years, 9 months ago by
davidmonnuar.
Sorry for the late reply and thanks for sharing your find! I will add it in the list of files that we exclude by default so it works seamlessly and we will further check such scripts and how to patch this. Once again – thanks for reporting back!