CSS class

js-ajax-cart-not-empty

A CSS class which is appended to the html tag when the user cart is not empty.

Example

Showing the cart quantity number in the header:

sections/header.liquid
<span class="header__cart-quantity">
  (
  <span data-ajax-cart-bind="item_count">
    {{ cart.item_count }}
  </span>
  ) 
</span>
assets/style.css
html.js-ajax-cart-not-empty .header__cart-quantity {
  display: inline-block;
}