I have a mobile app with many screens, now the customer wants this app to be multitenant, the background color and font needs to change per tenant. I have worked through many examples from the community. I cannot make it work for I don't want to have a hugh amount of CSS changes like Style or Class property changes like: "background-color: " + If(LocalQuickplug,"#e5b041","#fc4f00") etc.
Does anyone have a robust idea to make it work?
I have made this piece of Javascript in the OnRender of my mobile app
It's changing the root elements of the app! I also needed another font and that's working too.
This idea came to me by the wonderfull URL https://css-tricks.com/making-custom-properties-css-variables-dynamic/
Ineke de Raaf wrote:
Hi Ineke de Raaf ,
Thank you for idea.
:D
Cheers.
you can have different theme and can also keep their names in db and in layout refer it from db .
thanks for your reply Mahesh! do you know how to activate the theme on runtime in mobile?
Check this ,May helps
Regards,
Rama
I can add it as a Style :
I can add it as a Class :
But this is a lot of work since I have a big CSS for the app to be changed. I was looking for something more general, such as a complete CSS difference for the one or the other. I understood there could be some Javascript to change the CSS at runtime?