This is a migrated thread and some comments may be shown as answers.

Dynamic ThemeChanging using CSS Variables as in Material

2 Answers 1149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nagarajan
Top achievements
Rank 1
Veteran
Nagarajan asked on 12 Oct 2020, 10:45 AM

I have looked into the documentation and found that we can only precompile the SCSS files with required colors. And, I am not able to find a  way to importing single SCSS file and changing its color in runtime using CSS variables as in Material.

Telerik Recommended Way:https://www.telerik.com/kendo-angular-ui/components/styling/custom-themes/

Material Way

https://github.com/tomastrajan/angular-ngrx-material-starter

https://medium.com/grensesnittet/dynamic-themes-in-angular-material-b6dc0c88dfd7

 

I have tried it but I am not able to implement such using Telerik theme. So, please confirm me whether Telerik have the support for this or have any plan for this in future. 

2 Answers, 1 is accepted

Sort by
0
Nagarajan
Top achievements
Rank 1
Veteran
answered on 13 Oct 2020, 05:44 AM

Any update on this?

Is this possible with current telerik theming capabilities?

0
Svet
Telerik team
answered on 14 Oct 2020, 10:39 AM

Hi Nagarajan,

Indeed, currently there isn't a supported approach that allows to modify the Kendo SCSS themes at run time. Instead the desired theme customization should be achieved at compile time using the dedicated SCSS variables. Changing any of the applied application styles at run time can be achieved by adding some custom CSS dynamically when required.

Regards,
Svetlin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
Nagarajan
Top achievements
Rank 1
Veteran
Answers by
Nagarajan
Top achievements
Rank 1
Veteran
Svet
Telerik team
Share this question
or