Custom CSS ignored on refresh

I’m using Hugo Static Site Generator v0.74.3/extended linux/amd64 BuildDate: 2020-07-29T18:11:24Z
I have a site which includes custom.css (in static)
I am inspecting the site locally using hugo server -D
When I save the custom.css file, hugo refreshes and the css is applied (.container width 1280px, in this case)
But when I then update any content or reload the page, hugo refreshes and the custom style is ignored and the default is applied.

The first screenshot shows the page and inspector after updating the custom css file

The second screenshot shows the page after refresh and shows that now only the default style.css is used

The third shows the loaded custom.css and its source to the right. I’ve made the selector unnecessarily specific and added !important to ensure it should supersede the default, but no luck.

Any suggestions?

Share your code. See:
https://discourse.gohugo.io/t/requesting-help/9132

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

You are right of course, and thanks for responding.

As I was updating the git repo (when I develop locally I only push every now and then), this issue has stopped occurring. The site now follows custom css. I don’t have a clue what the problem was.

Thanks again for replying.