Skip to main content
Question

The icon inside our icon-button does not inherit the main component color token. It resets back to the nested component that controls the icon-button's size.

  • September 16, 2025
  • 2 replies
  • 61 views

Tiffany LeBlanc

Hello Figma community! đź‘‹

My team and I are having trouble with icon color overrides. I’ve read up on as many forums similar to this issue, but none seem to have a fix for our situation.

 

Problem Summary: Icon colors occasionally revert to nested component colors instead of inheriting the main component's color tokens when switching sizes in icon-button instances.

Component Structure:

 

  1. Nested component: .icon-button-configuration - controls button sizing 
  2. Main component: icon-button - wraps the nested component and manages color variables

Visual of the bug:

In the screens below, I’ve create an instance of the icon-button component and switched the size variant. The icon color sometimes changes back to white (nested component's color) instead of maintaining dark gray (main tonal component's token). 

The issue only happens with x-small, small, large, x-large. Icons correctly inherit colors for medium and xx-large sizes. 

 

What We've Tried:

  • Ensured all icons have identical structure (this resolved the issue for most community members, but not for us)
  • Unlinking icon color in the nested .icon-button-configuration (testing now)

Has anyone encountered this specific issue with nested icon-button components and found a solution? We're considering rebuilding individual variants for each size/shape/state/etc. combination, but hoping to avoid this tedious approach. 

All ideas/suggestions/advice appreciated – thanks! 🙏

2 replies

Genoni Studio
  • New Participant
  • November 17, 2025

Experiencing the same issue. Were you able to find a fix? 


Genoni Studio
  • New Participant
  • November 18, 2025

I found a fix for what I believe is the same problem.

  1. In the sub-component that contains the icon, create a wrapper for the icon component, set the icon height/width on this wrapper, and set the icon size to fill in both directions (assuming it scales proportionally). 
  2. Insert a white 8x8 pixel frame as a sibling of the icon component and position to “Ignore auto layout”. (Note it doesn’t have to be 8x8, this just helps you see it.)
  3. Create a Union of the icon and the 8x8 white frame. The white frame should now be hidden.
  4. You may have to realign the Union containing the icon to be in the center of the icon wrapper.

Now when you change the size from the nested property the icon should inherit the color.

Here’s what one variant of my button looks like. In my case, “content” is the nested component controlling the sizing of the button and the icon inside.

Button layers with nested component controlling icon sizing and swapping.

See discussion here:

Â