True that HexaCss allows for theme switching, but it is only a side effect of what it really allows : to have multiple css files bound to the same gwt application, without needing to recompile the application.
For example, you might want to rebrand your application for another customer, you might want to generate css on the fly according to some user preference, and so on.
There are other advantages. For instance, i saw many of my customer's projects were each widget has one CssResource interface associated and one corresponding css file. This leads to a lot of little css files scattered accross the project. With HexaCss, you can still have one java interface by widget, which is cool from the point of view of object oriented programming. And then you can make up bigger css files having each one cover several java interfaces. For example one CSS file for each of the three main packages of your application...
Also, what you can do : for instance imagine you are using an external GWT library. If this library uses CssResource, you will have hard time customizing its css. But if it uses HexaCss, you just have to provide a CSS file, run the maven plugin on it and you are done ! No need to make some CssResource inheritance mechanism to insert your own CSS. You don't have to entangle too much the CSS concepts and the Java architecture concepts.
There may be many more use cases, i found myself discovering new ones often. The first one was not having to recompile the application when chaning the css files.
In one word, what this tool does is to decorrelate the CSS use from the Java GWT compilation.
- The first phase of the tool does an analysis of your Java HexaCss interfaces to generate a consistent naming accross compilations.
- Then the maven plugin uses the information produced during the GWT compilation to transform your css files (generated with less, sass, gss or not) so that they are optimized and bound correctly to your application.
I am not sure i am really clear in my explanation, but i hope you get the idea... So the theme switcher is for me really just a way to show that the GWT compilation is decorrelated from the CSS binding, which is the essence of this tool.