renameByParts = function(cssName) {
    // Remap all the parts individually.
    var parts = cssName.split('-');
    var mapped = [];
    for (var i = 0; i < parts.length; i++) {
      mapped.push(getMapping(parts[i]));
    }
    return mapped.join('-');
  }
Handles strings that are intended to be used as CSS class names.

This function works in tandem with @see goog.setCssNameMapping.

Without any mapping set, the arguments are simple joined with a hyphen and
passed through unaltered.

When there is a mapping, there are two possible styles in which these
mappings are used. In the BY_PART style, each part (i.e. in between hyphens)
of the passed in css name is rewritten according to the map. In the BY_WHOLE
style, the full css name is looked up in the map directly. If a rewrite is
not specified by the map, the compiler will output a warning.

When the mapping is passed to the compiler, it will replace calls to
goog.getCssName with the strings from the mapping, e.g.
    var x = goog.getCssName('foo');
    var y = goog.getCssName(this.baseClass, 'active');
 becomes:
    var x = 'foo';
    var y = this.baseClass + '-active';

If one argument is passed it will be processed, if two are passed only the
modifier will be processed, as it is assumed the first argument was generated
as a result of calling goog.getCssName.

@param {string} className The class name.
@param {string=} opt_modifier A modifier to be appended to the class name.
@return {string} The class name or the concatenation of the class name and
    the modifier.