In order to optimize page speed loading we are moving all css styling changes to the style.css file in our child theme. This approach works well for plugins and other themes but not for Sparkling!
The only way we can get styling changes to work is to insert them into the “Additional CSS” box in the Wordpress Customizer this works. However this approach is not good for SEO because the styling changes are saved in the database and loaded with every new page. Of course we are clearing all caches, so this is not the cause!
Please advise how we can get the styling changes to work in the style.css file.
Hi, Just a thought…
I have seen this problem also, more than once. The cause was the child style.css loadinf before the parent style.css.
Have you enqueued the style sheets correctly in the child functions.php?
You can see the actual order that they are loaded by looking at the page source (e.g. of the home page) with “Ctrl U”.
The child style.css should (ideally) be the last css file to load.
The enqueuing of style sheets can be a bit tricky!!
Also be careful to avoid any css file being loaded more than once. This will slow the page loading (a little).
Hi,
It is tricky to say because I’ve seen some strange results from enqueue styles.
The “wp_dequeue_style” line looks incorrect. But it is difficult to say without seeing the resulting order of ther css files.
What is the URL of the site?
Of you can check the order yourself by looking at the page source (Ctrl U) and checking that the files are queued in the correct order. The child style should be the last to load.