Styling

Add To Cart generates native HTML that the host site can style. Our defaults include a basic set of styles where the producer’s developers can modify.

Horizontal Mode

To make the quantity selector and button on the same row, define the additional class vs-horizontal.

Note: You must have addToCartStyle set to true or the default for this style to work.

<div class="vs-add-to-cart vs-horizontal" data-vs-product-id="000"></div>

Basic Theming

By default, the theme variable defined in Configuration will be used in every button. You can overwrite an individual button's theme by setting the vs-theme attribute.

<div class="vs-add-to-cart" data-vs-theme="red" data-vs-product-id="000"></div>

Advanced Theming

You can define CSS Variables to customize the look based on our themes. Below defines all available settings with the default settings.

.vs-add-to-cart {
  /* General */
  --vs-atc-margin-bottom: 15px;
  --vs-atc-horizontal-select-margin-right: 15px;
  
  /* Button */
  --vs-atc-button-color: #ffffff;
  --vs-atc-button-background-color: #0d6efd;
  --vs-atc-button-border-color: #0d6efd;
  --vs-atc-button-border-width: 1px;
  --vs-atc-button-border-style: solid;
  --vs-atc-button-border-radius: 4px;
  --vs-atc-button-padding-y: 0.375rem;
  --vs-atc-button-padding-x: 0.75rem;
  --vs-atc-button-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0px 8px 16px 0px rgba(0, 0, 0, 0.149);
  --vs-atc-button-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  --vs-atc-button-font-family: inherit;
  --vs-atc-button-font-size: 1rem;
  --vs-atc-button-font-weight: 500;
  --vs-atc-button-line-height: 1.5;
  
  /* Hover */
  --vs-atc-button-hover-color: #ffffff;
  --vs-atc-button-hover-background-color: #0b5ed7;
  --vs-atc-button-hover-border-color: #0a58ca;
  /* Focus & Active */
  --vs-atc-button-active-color: #ffffff;
  --vs-atc-button-active-background-color: #0a58ca;
  --vs-atc-button-active-border-color: #0a53be;
  --vs-atc-button-active-shadow: inset 0 3px 5px rgba(#000, .125);
  /* Disabled */
  --vs-atc-button-disabled-color: #ffffff;
  --vs-atc-button-disabled-background-color: #0d6efd;
  --vs-atc-button-disabled-border-color: #0d6efd;
  --vs-atc-button-disabled-opacity: 0.65;
  --vs-atc-button-disabled-box-shadow: none;
  
  /* Quanitiy Select */
  --vs-atc-select-color: #000000;
  --vs-atc-select-background-color: #ffffff;
  --vs-atc-select-padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  --vs-atc-select-margin-bottom: 15px;
  --vs-atc-select-background-image: '** SVG Excaped Image **';
  --vs-atc-select-background-position: right 0.75rem center;
  --vs-atc-select-background-size: 16px 12px;
  --vs-atc-select-border-width: 1px;
  --vs-atc-select-border-style: solid;
  --vs-atc-select-border-color: #ced4da;
  --vs-atc-select-border-radius: 0.375rem;
  --vs-atc-select-box-shadow: inset 0 1px 2px rgb(0 0 0 / 8%);
  --vs-atc-select-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  --vs-atc-select-font-size: 1rem;
  --vs-atc-select-font-weight: 300;
  --vs-atc-select-line-height: 1.5;
  /* Focus */
  --vs-atc-select-focus-color: #000;
  --vs-atc-select-focus-background-color: #ffffff;
  --vs-atc-select-focus-border-color: #86b7fe;
  --vs-atc-select-focus-box-shadow: inset 0 1px 2px rgb(0 0 0 / 8%), 0 0 0 0.25rem rgb(13 110 253 / 25%);
  /* Disabled */
  --vs-atc-select-disabled-color: #a9a9a9;
  --vs-atc-select-disabled-background-color: #e9ecef;
  --vs-atc-select-disabled-border-color: #ced4da;
  --vs-atc-select-disabled-cursor: not-allowed;

}

Removing all Vinoshipper Style

For the most control, set addToCartStyle: false in Configuration to remove all styles from Add To Cart buttons. You will be responsible for all styling.