How to create a custom CSS for the theme

Hello, I would like to modify the CSS of the theme by using the custom folder. I tried to load in the custom folder files with css (style.css example) with the changes but seems to have no effect.
Maybe I’m wrong in something?
Thanks for the support

Do you have developer mode on? Go into the admin settings and turn that on. This will take away the cached css etc…

Hi Andy, thanks for the reply. I activated developer mode to on. It seems that nothing has changed. I do not see any option new and even that work on CSS.
What am I doing wrong?

The theme framework hasn’t been changed since the fork of sugar so this documentation should tell you everything you need to know:

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.7/Application_Framework/Themes/index.html

Thank you, now it’s more clear how it works.

Hi,

I’ve followed the instructions at http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.7/Application_Framework/Themes/index.html.

File permissions are correct, I have a themedef.php in ./custom/theme/mytheme and I’ve done a repair, but I cannot see my custom theme for selection in Admin -> Themes.

Any advice as to what I am doing wrong?

Thanks
Gary.

I just made a video about this.

https://www.youtube.com/watch?v=uDXK0ek-GJw&list=PLukhYAGT0p6EjCd_Qq44_jlzOHt59oQyJ&index=9

Hope that helps!

Hello @AchLive,

I did some debugging and it seems that the theme does not appear because of the fact that the version is not correct. It is sufficient to create a theme folder in your custom directory like this:

/themes/custom/<theme name> and add only the /themes/custom/<theme name>/themedef.php file.

$themedef = [
'name' => 'My theme name',
'description' => 'My theme description.',
// The folder name of the parent theme.
'parentTheme' => 'SuiteP',
'version' => [
'regex_matches' => ['.+'],
],
];

Without version, if you check the SugarThemeRegistry::add method, you will see that suitecrm adds the default version regex that does not always match with your current version, so it will return false for your theme and it won’t be displayed in the Themes list.