Thread Starter
mmsosa
(@mmsosa)
Well, the real performance impact is minimal (a.o. because the full CSS is loaded in a non-render-blocking manner) but if you absolutely need/ want to tackle you could set the media-type of wp-content/themes/gridlove-child/style.css to all instead of screen to ensure it gets aggregated with the rest of the CSS 🙂
hope this helps,
frank
Thread Starter
mmsosa
(@mmsosa)
How can I set media-type to all instead of screen?
before install criticalcss
View post on imgur.com
after install criticalcss
View post on imgur.com
How is this possible?
I thought the website was going to improve speed
How can I set media-type to all instead of screen?
check with whomever created your child theme; the CSS is enqueued with media-type screen (probably in functions.php) if you(r developer) change that into all (or leave it un-specified) it will be aggregated with the rest.
How is this possible? I thought the website was going to improve speed
critical CSS specific aim is to (make the CSS not render-blocking and that way) improve the start render/ first paint times and only that, check results on the “timings” tab in GTmetrix 🙂
frank
Thread Starter
mmsosa
(@mmsosa)
change it
function gridlove_child_load_scripts() {
wp_register_style('gridlove_child_load_scripts', trailingslashit(get_stylesheet_directory_uri()).'style.css', false, GRIDLOVE_THEME_VERSION, 'screen');
wp_enqueue_style('gridlove_child_load_scripts');
}
to this
function gridlove_child_load_scripts() {
wp_register_style('gridlove_child_load_scripts', trailingslashit(get_stylesheet_directory_uri()).'style.css', false, GRIDLOVE_THEME_VERSION, 'all');
wp_enqueue_style('gridlove_child_load_scripts');
}
Is this ok?
yes, that looks OK at first sight 🙂
hi, please, print it again after the chage.