Set appropriate unit value when parsing element styles.