function normalizeStyles(styles) {
    var normalized = {};
    var docElemStyle = document.documentElement.style;
    var prop, prefixedProp;

    // Normalize visible styles (prefix and remove invalid).
    for (prop in styles) {
      if (!styles[prop]) continue;
      prefixedProp = getPrefixedPropName(docElemStyle, prop);
      if (!prefixedProp) continue;
      normalized[prefixedProp] = styles[prop];
    }

    return normalized;
  }
Normalize style declaration object, returns a normalized (new) styles object
(prefixed properties and invalid properties removed).

@param {Object} styles
@returns {Object}