0

I'm curious what the best route to take for allowing themes in a website would be with the technologies available today?

A little background.

Currently theming is accomplished on an application I'm working on by having a core set of files for each of the different layout types that are offered. In addition there is a CSS file for each layout that controls colors. Color values are put into place by entering the value in a text file and then running a custom Python script which assigns the color into the CSS when it compiles the files together.

I then take the compiled files and copy them into the C# solution.

My questions and desired end.

Is it best to continue to compile CSS outside of the solution and copy compiled fiLes into the solution? Would it be worth it to switch to something like LESS?

Ideas for integrating it into the application and making it dynamic?

Take advantage of CSS3 and responsive design.

Best way to allow users to select custom colors for specified areas via a color picker. Currently this is accomplished by writing custom CSS into the header to overwrite the base CSS.

Are there any good examples websites out there that show good theming?

Thank you!

Blobula
  • 189
  • 5
  • 13
  • This question is either too broad, opinion based or invites discussion and so is off-topic for Stack Overflow – Paulie_D Nov 05 '15 at 11:16

1 Answers1

1

Any solution should allow you to take advantage of CSS3 and responsive design.

If you hadn't mentioned that you'd like to include a colour picker, I would have said that LESS would be the simplest and most maintainable way to achieve theming (SASS is probably fine too but I haven't used it myself).

You can learn the syntax in a few hours and if you were willing to allow users to choose from a predefined list of themes, the below post would have everything you need to set up your stylesheets with more or less a single point of maintenance:

LESS CSS - Change variable value for theme colors depending on body class.

I don't have anything to add regarding user defined colour schemes. I'd need to research that myself.

Community
  • 1
  • 1