import re


def EnumToCssProperty(enum_name):
  """Converts a camel cased enum name to the lower case CSS property."""
  # The first group also searches for uppercase letters to account for single
  # uppercase letters, such as in "ZIndex" that need to convert to "z-index".

  # Special case total page measured for backward compat.
  if enum_name == "TotalPagesMeasured":
    return "Total Pages Measured"

  return re.sub(r'([a-zA-Z])([A-Z])', r'\1-\2', enum_name).lower()