I read the source code because I was trying to see how a solved problem needed so much code to implement.
Well actually, I think CSS Modules solved it in the most "perfect" way, but I'm willing to believe that others have problems I haven't experienced before :)