Passing variants to cart in Commerce
I think you're asking how to output custom fields based on their type.

Something like this should work:

{% for lineItem in cart.lineItems %} 

// Is the current line item a variant purchasable?
{% if className(lineItem.purchasable) == 'craft\commerce\elements\Variant' %}

  {% switch lineItem.purchasable.product.type.handle %}
    {% case "clothing" %}
        // Only output the varHeight if the product type is clothing
        {{ lineItem.description }}&lt;br&gt;
        Var Height: {{ lineItem.purchasable.varHeight }}
    {% default %}
        {{ lineItem.description }}
  {% endswitch %}

{% else %}

  // Non variant purchasable
  {{ lineItem.description %}

{% endif %}

{% endfor %}