Css Caching Problem

Hello.

I'm having an issue with caching on v4.3.

On my dev server I've turned on "Rebuild cache automatically", and it is working as expected, except for rebuilding the CSS if I make changes to the LESS files. More specifically, it is failing to re-compile the CSS if the changed LESS file is @import -ed. Making changes to the top level styles.less get picked up right away, but not not if I edit any of the @imports.

Manually deleting the standalone.css file in cache/misc/assets/themes/[theme name]/css works, but I don't have time to do that every freaking time.

Have tried it on my staging server to and am seeing the same thing.

Anyone else got this?

Yep. What I do is to use the cc option on the admin.php (mysite.com/admin.php?cc) each time I make a change.

OK, that's good to know.

For now I think I'll edit styles.less while developing, then move my changes into the appropriate @import when everything is done. Not ideal, but quicker than clearing the cache manually each time.

Why would you want to use @import in the distributed file rather than just supplying your own css/addons/my_changes/my_changes.less?

This then (because it's registered with the system from your hooks/index/styles.post.tpl hook) will be rebuilt anytime the rest of the css system is rebuilt. @imports are handled by the browser, not the system and I don't believe they are cache time sensitive.

Why would you want to use @import in the distributed file rather than just supplying your own css/addons/my_changes/my_changes.less?

This then (because it's registered with the system from your hooks/index/styles.post.tpl hook) will be rebuilt anytime the rest of the css system is rebuilt. @imports are handled by the browser, not the system and I don't believe they are cache time sensitive.

Because I didn't know that.

Strongly suggest you read the knowledge base about addons and their development.

Generally if you're not going to use the admin interface for changing themes (they overload this term to be both css styles and the skin itself) then you will want to use the my_changes addon or create a new addon.

If you use the theme editor then your changes are stored in the DB and applied as they change. If you use the addon method, then you'll have a separate file that is loaded at the end that will allow you to overwrite (cascade) css changes.