0

I have a problem that has been plaguing my project from the beginning. It seems that old versions of style.css in my child theme are conflicting with the active version.

For example, in previous iterations, i had a class ".facet-sort" with a max-width of 150 px. When I delete the max-width rule but the page styling doesn't change. When I inspect the source code, I can still see that rule. Yet when I check the style.css page in my child theme folder, I can confirm that that rule has indeed been deleted.

Upon further inspection with the Firefox page inspector I found older versions of the stylesheet that are still active and being applied to the page (see images below).

It is not the result of a conflict with style.css in the parent theme since I can see that these are old classes from an earlier version of the stylesheet uploaded to my child theme.

I guess it must be the result of caching. Ive tried clearing all of the caches on the site. Ive also contacted the technical service of my hosting provider and confirmed with them that all caches have been flushed. But to no avail.

I would appreciate any advice you can offer.

Image from Firefox Page Inspector

Image from Firefox Inspector Stylesheets

ACross
  • 1
  • 1
  • Does [this](https://stackoverflow.com/questions/7671168/why-adding-version-number-to-css-file-path), [this](https://stackoverflow.com/questions/21714653/flask-css-not-updating), [this](https://stackoverflow.com/questions/24501611/wordpress-website-still-loading-old-style-css), [and this](https://stackoverflow.com/questions/1614429/what-is-style-cssver-1-tag) help? – vee Apr 07 '22 at 03:46
  • "I've tried clearing all of the caches on the site" - i'm not sure what this means. Have you cleared all the caches in your browser (nothing to do with the actual site). Also have you tried another device and/or another browser? – A Haworth Apr 07 '22 at 05:32
  • Thanks for replies. @vee, I read through that documentation. I found one recommendation that seems to have resolved the problem this morning. Cntrl + Shift + R cleared the cache and allows me to see the correct css. @A Haworth, I think answers your question as well. – ACross Apr 07 '22 at 15:11
  • Ive noticed that the css style sheet in my parent theme gets a unique version number: "...themes/ahtimeline-theme/dist/css/app.css?ver=0.4.26" whereas the css in my child theme displays does not seem to get a unique version number "...themes/ahtimeline-theme-child/style.css?ver=1.0.0" Ive also noticed that the parent theme css overrides the child theme css. – ACross Apr 07 '22 at 15:18
  • The style sheet is enqueud in the child theme functions.php with the following code: – ACross Apr 07 '22 at 15:22

0 Answers0