◼️
Infinite Options Docs
  • Getting Started
    • How to Install
    • Create custom options
    • Show options on a product
    • Expert Install Service
  • Set up and manage options
    • Assign Options by Tag
    • Assigning Options: Excluding a few products
    • Don't display options on certain products
    • Duplicate option sets
    • Bulk Add Values to Infinite Options
    • Reorder Option Sets
    • Make drop-downs required
    • Make Swatches required
    • Change where options display
    • Finding options on the admin side
    • Featured Product/Homepage
  • Install Infinite Options
    • Boundless Theme
    • Brooklyn theme
    • Colorblock Theme
    • Craft Theme
    • Crave Theme
    • Debut Theme
    • Dawn Theme
    • Minimal Theme
    • Origin Theme
    • Publisher Theme
    • Refresh Theme
    • Ride Theme
    • Sense Theme
    • Simple Theme
    • Studio Theme
    • Supply Theme
    • Taste Theme
    • Venture Theme
    • Locating the Product Form
    • Copy of Installing Infinite Options directly in the theme (1.0 theme)
  • Add a ShopPad team member to your store
  • Increase the Cost of an Option
    • Moving from Legacy to Native Bundling
    • Show price changes on the product page
    • Native Bundling
    • Product bundles
  • Conditional Logic
    • Conditional Logic
    • Uploadery
    • Dropdown menus
    • Swatches
  • Popular Setups
    • Up-charge Pricing + Text Box
    • Mix & Match Variety Pack or Gift Pack Example
    • Add on Gift Wrapping Option
    • Multiple Engraving Initials
  • Troubleshooting
    • Resolving "Cannot Find Variant" Error
    • Cancel your Subscription
    • Is the app installed?
    • How to disable Infinite Options
    • Quick Shop Feature
    • My options are not showing
    • Performance and Optimization
      • Remove loading delays
      • Bulk Add Values to Infinite Options
      • Hide _io_order_group and _io_parent_order_group from cart
      • Display option selections on customer account page
    • Why are option selections labeled "infinite_options_1"?
    • Options are showing on desktop and not mobile
    • Dashboard terms explained
    • Options are not showing on the backend
    • Display option selections in the cart page
  • Inputs and Field Settings
    • Swatches
      • Create Swatches
      • How to make Swatches required
      • Customize Swatches using CSS
      • Adjust Swatches - display the name once the swatch is hovered over
    • Change or translate required pop-up message/characters remaining text
    • Add a date picker to your store
      • Customize the date picker
  • Visual Changes - adding styling
    • Customize Options using CSS
    • Craft theme
    • Dawn theme
    • Debut theme
    • Studio theme
  • Display Options on Shopify Notifications
    • Shopify emails and packing slip templates
      • Order Confirmation
      • Packing Slip
      • Shipping Confirmation
      • New Order
      • Fulfillment Request
      • Abandoned Checkout
    • Order Printer/Pro templates
    • Legacy: Display Options on Shopify Notifications
      • Order Confirmation
      • Packing Slip
      • Shipping Confirmation
      • New Order
      • Fulfillment Request
      • Abandoned Checkout
  • Developer Resources
    • Event API
    • Development Store/Affiliate Store Plans
  • Integrations
    • Fablet store
    • Ecomposer
    • GemPages
    • PageFly
    • Replo Page Builder
    • UpOrder
    • Weglot
    • Zipify Pages
  • FAQs & How-tos
    • Can I export options with orders via a CSV file?
    • How do I create more than 100 variants?
Powered by GitBook
On this page
  1. Inputs and Field Settings
  2. Swatches

Customize Swatches using CSS

PreviousHow to make Swatches requiredNextAdjust Swatches - display the name once the swatch is hovered over

Last updated 4 days ago

Swatches can be styled with CSS code to change how they display on your product pages. Follow the steps below to customize the appearance of swatches.

1. Starting with the Infinite Options app open, navigate to the Settings section in the left sidebar.

2. Locate the Custom CSS field.

3. Copy any of the customization snippets located at the bottom of this document.

4. Insert the code snippet into the Custom CSS field.

5. Save your changes.

Looking to add hover text over swatches? Click here to learn more.


Customization Snippets

  • Large Swatches

  • Round Swatches

  • Vertically-displayed Swatches

  • Horizontal Swatches

  • Horizontal Swatches without labels

  • Two-column Swatches

  • Three-column Swatches

  • Faded hover effect on swatches

  • Add bottom spacing to swatches

  • Change border color of swatches

  • Apply black border on selected swatch

  • Apply thicker border on selected swatch


Large Swatches

#infiniteoptions-container .spb-productoptionswatch {
  width: 40px !important;
  height: 40px !important;
}

Default width and height is 32px.


Round Swatches

#infiniteoptions-container .spb-productoptionswatch {
  border-radius: 50%;
}

Vertically-displayed Swatches

#infiniteoptions-container .spb-productoptionswatchwrapper {
  display: block !important;
}

Horizontal Swatches

#infiniteoptions-container .spb-productoptionswatchwrapper {
  display: inline-block;
  margin-right: 5px;
}

Horizontal Swatches without labels

#infiniteoptions-container .spb-productoptionswatchwrapper {
  text-indent: -1000px;
  overflow: hidden;
  display: inline-block;
  position: relative;
  width: 36px;
  height: 36px;
  margin: 0 5px 5px 0;
}

#infiniteoptions-container .spb-productoptionswatch {
  position: absolute;
  top: 1px;
  left: 1px;
}

The snippet above will work best if you did not adjust the size of your swatches. If you have adjusted your swatches to be smaller or larger using the Large Swatches snippet, please adjust the width and height numbers in the first block of code to be 4px larger than your swatches.


Two-Column Swatches

#infiniteoptions-container .spb-productoptionswatchwrapper {
  display: inline-block;
  width: 50%;
}

Alignment not displaying like the example?


Three-Column Swatches

#infiniteoptions-container .spb-productoptionswatchwrapper {
  display: inline-block;
  width: 33.3%;
}

Alignment not displaying like the example?


Faded hover effect on swatches

#infiniteoptions-container .spb-productoptionswatch:hover {
  opacity: 0.5;
}

Add bottom spacing to swatches

#infiniteoptions-container .spb-productoptionswatchwrapper {
  padding-bottom: 5px !important;
}

Change border color of swatches

#infiniteoptions-container .spb-productoptionswatch {
  border: 1px solid #000000 !important;
}

#000000 is the hex color value for black.


Apply black border on selected swatch

#infiniteoptions-container .spb-productoptionswatchwrapper input[type="radio"]:checked + .spb-productoptionswatch,
#infiniteoptions-container .spb-productoptionswatchwrapper input[type="checkbox"]:checked + .spb-productoptionswatch {
  box-shadow: 0px 0px 0px 1px #000000 !important;
}

Apply thicker border on selected swatch

#infiniteoptions-container .spb-productoptionswatchwrapper input[type="radio"]:checked + .spb-productoptionswatch,
#infiniteoptions-container .spb-productoptionswatchwrapper input[type="checkbox"]:checked + .spb-productoptionswatch {
  box-shadow: 0px 0px 0px 2px currentColor !important;
}