Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
333 views
in Themes by
edited by
I made some changes in my CSS file, but it does not impact anything visually.

And I was mainly shocked when I deleted the CSS file from my directory and the website still works as if the CSS file is still there. With or without file, the website still works the same. Why?!
by
+1

1 Answer

0 votes
by
edited by

EDIT:

I've just realized I was pointing it to the RTL styles. I was confusing it with my updated structure.

Add this function to your qa-theme.php file:

public function css_name()
{
    return 'qa-styles.css?v=001';
}


That's most likely to be what @GateOverflow said.

You need to force browser update by adding a file version query string to your CSS link.

If you want to test if that is case, refresh your page by pressing the keys:

Ctrl+F5 - if you're on Windows
Command+Shift+R - Mac

This will force browser cache refresh just for you.

SnowFlat theme has a query string embedded with the Core because SnowFlat updates usually come in conjunction with Core updates. So SnowFlat already has a query string version attached to the CSS link. Same as the core.

To add or update a query version to your updated SnowFlat theme, go to:
Q2A > qa-theme > Snowflat > qa-theme.php - Line64

$this->content['css_src'][] = $this->rooturl . 'qa-styles-rtl.css?' . QA_VERSION;

Update it to this:

$this->content['css_src'][] = $this->rooturl . 'qa-styles-rtl.css?v=001';

...