1

I have a basic app in angular 2 with Kendo UI controls. I have a drop down with theme 1, theme 2 and theme 3. and a button. How should the default styles.scss file be toto handle those 3 themes? What should be done in the component ts file to use one or other theme on the client at run time and modify the button color?

Thx

Ariel Erlijman
  • 362
  • 4
  • 15
  • I have the same question? did you manage to solve it? – mor222 Jun 27 '19 at 10:17
  • A designer and other developer in the team did that at the end. We using Angular Material now and some Kendo Controls. What we did was to import all kendo material themes and overwrite them using imports and mixins with scss for all and for each component. Not sure how they did that really. Sorry. – Ariel Erlijman Jun 28 '19 at 11:34
  • Exciting news, seems the kendo team is working on a css variable based theme. Issue is being tracked here. https://github.com/telerik/kendo-themes/issues/798 – Eric Phillips Sep 30 '21 at 14:16

1 Answers1

0

There is no straight-forward approach for such scenario. Generally speaking, you have two options:

  1. Use the already compiled CSS files, and replace them in your page, as any other CSS

  2. Compile the scss files on the server and then replace the styles on the page.

knikolov
  • 1,650
  • 1
  • 12
  • 18
  • I understand the options... but not really how to do them. I do not get clear If I must have different scss files for all my themes or 1. What do you mean with replace it in my page? Any help will be great. Thx – Ariel Erlijman Feb 02 '17 at 16:27
  • you need to have the compiled CSS files available and then replace them like this - http://stackoverflow.com/questions/19844545/replacing-css-file-on-the-fly-and-apply-the-new-style-to-the-page – knikolov Feb 03 '17 at 07:49