function getStyleKey(snapshot, tagName, compress = false) {
  const entries = [];
  const defaultStyles = getDefaultStyleForTag(tagName);
  for (let [prop, value] of Object.entries(snapshot)) {
    if (!compress) {
      if (value) {
        entries.push(`${prop}:${value}`);
      }
    } else {
      const defaultValue = defaultStyles[prop];
      if (value && value !== defaultValue) {
        entries.push(`${prop}:${value}`);
      }
    }
  }

  return entries.sort().join(";");
}
Creates a unique key from an element's computed style that differs from defaults.

@param {Object} snapshot - Computed style snapshot
@param {string} tagName - The tag name of the element
@param {boolean} [compress=false] - Whether to compress style keys
@returns {string} Semi-colon separated list of non-default properties