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, e.g. Search Modal.

  • --font-family — The font family of every widget.
  • --color-primary — The color of Search Button and bullets in Onboarding Block.
  • --color-primary-hover — The color of Search Button and bullets in Onboarding Block 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.

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;
...
}