Totara Learn Open Discussions

All about custom theme

 
Rocky Go
All about custom theme
by Rocky Go - Wednesday, 9 March 2022, 9:28 AM
 

Hi there,

I have a couple of questions regarding custom theme in Totara 14/15.

1. How to change the default color as seen in 'colors' tab on the theme settings page, ie. Primary brand color is default to #4b7e2b. Where to change this value? I've tried overriding the variable through /client/component as well as /server to no avail.

2. Is it possible to add more theme settings? In totara 12, I used to create my own theme settings but I couldn't figure out a way to do this using Ventura theme. I would like to retain the current Ventura's theme settings, but add more tabs to it.

Thank you for the help.


Regards,

Rocky

Simon Chester
Re: All about custom theme
by Simon Chester - Thursday, 10 March 2022, 7:54 PM
Group Totara

Hi Rocky,

To change the default colours, you'll need to set them in the global_styles/_variables.scss file in the client/component folder for your theme, and they'll be picked up from there.

Have a look at theme_ventura's one for an example: client/component/theme_ventura/src/global_styles/_variables.scss

To add more theme settings, currently this can be done by overriding the core theme settings components in your theme.

There are some examples of both of the above in our example theme repository: https://git.totaralearning.com/projects/EXAMPLE/repos/theme_example/browse

Cheers,

Simon

Aleksander Lech
Re: All about custom theme
by Aleksander Lech - Tuesday, 20 December 2022, 2:20 AM
Group 2022 Learner of the Year (Bronze)Group TXP Site Administrator

Hi Simon,

I'm trying to overwrite the default ventura colours as per your suggestion but with no luck. 
Other than editing the file component/THEME/global_styles/_variables.scss is it anything more in terms of configuration or scripting that should be done?

My overriden scss value is not present on the theme settings page.


Thanks

Olek