user2634009
user2634009

Reputation: 279

ASP.NET MVC how to change less variables with javascript?

In my application I must add feature for the user to chnage UI colors.

For this purpose I have created .less file and set some global variables to their default value.

What is the best practice for creating theme in Asp.net MVC?

Upvotes: 4

Views: 892

Answers (1)

Mark
Mark

Reputation: 3271

I would create a base styling for the default styling and different stylesheets (less files and finally seperate .css files) for each colorscheme, each scheme overrides the colors in the base file, then dynamically load the stylesheet according to your business logic using javascript

Dynamically loading css stylesheets

Upvotes: 2

Related Questions