Skip to content
vviinn DocsDocs Beta

CSS Variables

Theme-level customization using CSS Custom Properties (CSS Variables) for all or specific vviinn widgets.

Each component’s page in the Component Reference lists all of its variables. For example, see the Search Modal variables.

  • --font-family: The font family of every widget.
  • --color-primary: Accent color of the action and upload buttons, the drag-over drop zone and the Onboarding bullets.
  • --color-primary-hover: --color-primary on mouse hover.
  • --modal-border-radius: The border radius of the modal.
  • --product-card-width: Minimum width of product card inside the grid.
  • --search-modal-animation-duration: The animation duration of the modal on desktop devices.
  • --search-modal-animation-duration-mobile: The animation duration of the modal on mobile devices.
  • --vviinn-results-row-gap: Vertical gap between rows of product cards.

Plus the Product Card variables.

  • --basket-button-bg-color-pressed: The background color of the pressed Basket Button.
  • --product-card-content-align: The alignment of the content inside the product card's flex container.
  • --product-card-image-aspect-ratio: The aspect ratio of the product card image (e.g., "1 / 1", "3 / 4").
  • --product-card-image-bg-color: The background color of the product card image.
  • --product-card-image-border: The border of the product card image.
  • --product-card-text-align: The alignment of the text inside the product card.
  • --product-card-transition-duration: Duration of skeleton to content transitions.
  • --product-card-width: Minimum width of product card inside the grid.
  • --vviinn-results-row-gap: Vertical gap between rows of product cards.

Plus the Product Card variables.

  • --sidebar-animation-duration: The animation duration of the recommendations sidebar.
  • --vviinn-carousel-columns: A number of items in grid mode.

Plus the Product Card variables.

  • --shop-the-look-product-card-width: Width of the product card in the detail view. Defaults to 160px on desktop and 120px on mobile — a set value applies to both.
  • --shop-the-look-results-grid-width: Width of the tiles grid in the grid view — tiles scale with it. Defaults to 140px.

See Shop-the-Look styling for the two views and an example.

Apply the CSS variables to all vviinn widgets on the page by using the html selector:

html {
...
--color-primary: #078688;
...
}

To apply variables to a specific widget, use the widget name as a selector:

vviinn-vps-button {
...
--color-primary: #078688;
...
}