CSS Design vs CSS File



We are looking at converting our CSS Design files over to CSS files because of the annoying issue that you cannot edit the CSS Design files in Safe Edit. Are there issues that I should be concerned about by doing this? Performance would be the biggest thing that comes to mind. Is there any performance hit by switching to CSS files?

Anything else?

(Bart Banda) #2

There are no performance affects by using static CSS files. The only thing you can’t really do is to have file assets underneath it for things like background images and reference them using the mysource_files/image.jpg method.


Hi @Bart if a site has been set up using CSS design assets, is there any thing that we should be aware of or is there any unexpected issues when deleting the existing CSS design assets and replace them with static CSS files? Thanks.

(Bart Banda) #4

Not really, just that you can’t use the mysource_files/image.jpg directive as I mentioned above. Again, you don’t really have to transform them into static CSS files either if you don’t want to.


Just in addition to the above, keywords and asset id short links (./?a=12345) will be processed in a css design file but not a static css file.


Thanks for confirming @Bart and @bkelly.

Just wondering given some advantages of using CSS Design file, is there any workaround for the fact that it is not SafeEdit-able? Or is it just our version of Matrix (5.3) and it is actually SafeEdit-able in the later version of Matrix?


Perhaps test group membership using %begin_globals_user_member_groups^contains:XXXX% to optionally print a dev CSS design file.

(Bart Banda) #8

No, in later versions CSS Design Files are still not safe-editable. These days most people manage their CSS and JS files in Git and use branches to work on style changes without breaking the live version. I’d still suggest using static CSS files where possible though if you want to use Safe Edit features with them.