Upon further investigation I have found that the inc/class-astra-dynamic-css.php file includes a combination of variables from the Customizer and hard-coded values. Particularly I was seeking to alter the astra_parse_css breakpoint from 768/769, but those values are hard-coded throughout the file. Might that become a variable in the customizer also?
Hi @matt6303 ,
Would you mind letting me know what exactly you wish to have when you have Astra theme installed on your site?
Are you bit worried about the CSS that is been loaded in your site header? If yes then you can use Autoptimize plugin in order to have static CSS file.
Further, if you need any help regarding the breakpoints alteration then please open a ticket in our support center.
Is it possible to disable Dynamic css by a function in my child theme?
Hi @keepact,
Kindly refer an article here. Hope this will help!
Regards,
Anjali
Hello, just returning to say that with the provided link filter works but when I copy the inline css to an external file and link in the <head> tag not all styles come back.
I was able to make it work with this code:
function wpse_remove_inline_style( $dynamic_css )
{
wp_style_is( $dynamic_css, ‘enqueued’ )
&& wp_style_add_data( ‘astra-theme-css’, ‘after’, ” );
}
add_action( ‘wp_print_styles’, function()
{
// Remove previous inline style
wpse_remove_inline_style( ‘astra-theme-css’ );
} );
Regards
Hi @keepact ,
Glad you figured it out. 🙂
Alternative solution for your request without coding is that you can use autoptimize plugin.
Here is the screenshot for that option.
I hope this is an easy way to get what you wanted.
Regards,
Deepak