I notice that many web sites use css files where the class names are minimized to produce the smallest length. While I am aware of tools that will minimize the css file by removing spaces and line feeds, it isn't clear to me how class names get renamed. I would like to use friendly names for development but have optimized names for release versions of my app.
Normally when I create a css class name I name it to something that is easy to understand. For example:
.errorMessage {
color: #ff0000;
}
and in my html I would have this:
<span class="errorMessage"></span>
But when optimized I would like to see:
.em {
color: #ff0000;
}
<span class="em"></span>
But this requires having to change the class name in the html which clearly is unacceptable if done manually. I'm guessing that tools may exist that do this renaming or is this done through some other means?