My CSS even when compiled with gss renaming of names is becoming too big for fast initial loads and I am looking for ways to split up the file into modules - one initial module that contains the essential styling for what is shown first in the app and subsequent module(s) that can be loaded and installed later.
In theory I can go with manual splitting of the css, but this is sub-optimal because style is generated by *.less parts and only then passed to gss. Another issue with that approach would be that I am using class name renaming and I am not aware of a way to have consistent name maps between several compiles. For example I have these two class names:
material-item
material-button
Assuming I would need only the button in the first css file (the main file to be loaded right away) I would include that style in the first manually separated file and gss will rename 'material' to lets say 'a'
Then in the second file I would include material-item and run gss on it - then 'material' might be renamed to something else, let's say 'b'.
Now I need to go to the closure compiler and I need to build the whole project (possibly using modules there as well) and I need one consistent map to include in the build - I cannot simply merge the two produced maps.
So basically my question is more in the line of: how do I use modules in gss+closure compiler for CSS?
I see that styles are being loaded in gmail dynamically and with minified names so I assumed there is a way, but I just can't figure it out.
Thanks.