Change size of text in variant

Topic summary

A Shopify store owner using the Flex theme wants to reduce the font size of variant option text (e.g., “Grey Marble,” “Sesame”) while keeping the label size unchanged.

Solutions Provided:

Two community members offered CSS-based fixes:

  • Option 1: Add custom CSS code in the theme.liquid file before the </body> tag
  • Option 2: Insert CSS directly into the custom CSS field:
fieldset.swatch .swatch__options .swatch__option > .swatch-element label {
  font-size: 20px !important;
}

Both solutions successfully resolved the issue. The user confirmed both methods work and thanked the contributors.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

I use flex theme and i want to change the size of variant text , im sure is with code but i tryed many things but seems that it doesnt work

i want to change the size of the all textes like grey marble sesame ecc not the label , is it possibile?

thats my page

https://sino-swiss.ch/collections/akustik-trennwand/products/elektrisch-hohenverstellbarer-burotisch-eiche-natur-kopie?variant=46299135934719

Thx

1 Like

Hi @Olaf5

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “theme. Liquid” file. Find the tag and paste the code below before the tag.

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Hi @Olaf5

You can try this one:

BF:

AT:

Here is the code:

fieldset.swatch > .swatch__options > .swatch__option > .swatch-element > label {
   font-size: 20px !important;
}

You can add in custom CSS field.

Hope this can help!

Best,

Daisy

Thank you guys both works

Thank you another time for your help :wink: