Performance Issue on css and javascript styling
Yes! This looks like a maintenance head ache ( nightmare ).

CSS belongs to CSS files ( you can apply csslint to CSS files, CSS files also have syntax highlighting, plus most developers rightfully dislike maintaining CSS in JavaScript ).

If you must support different styles at run-time, you can create styles in your stylesheet for each theme and then assign the right class when themes get switched.

To your points:


I find this method to be easy to maintain and update to other themes because the underlying samples are there and its not hard coded in the script. I am not sure what you mean by "not hardcoded", but you are most likely wrong.





So I can just create another theme like aqua for example and just change the colors, etc. You can do the same with CSS files
Also I can dynamically change the theme easier without having to do a page refresh. You can do the same by changing the class dynamically


As for performance, you are using extra bandwidth by sending over all style-sheets, to be avoided on mobile.