I’m creating some icons with a base resolution of 1024 x 1024.
Each icon design variation is created as its own component at 1024px.
Then, I have some components which contain those icons where those icons are scaled to different sizes depending on the treatment. (60px, 72px, etc.) In order to maintain the icon design at various scales, I use the scaling tool accessed via the ‘k’ key.
From within the main component (non instances) I can then swap the scaled icon for any other icon component and the scaling applied by the ‘k’ tool is maintained.
However, when creating instances of the component, and then attempting to swap the inner icon instance in exactly the same way as I do within the parent instance, scaling is NOT maintained.
I’ve attached a video which demonstrates the issue:
https://imgur.com/F2wLXJd
In the video, I’ve created two example icons. The first icon contains a series of grey capsules which should be scaled. The second icon is exactly the same but with yellow capsules.
The icon-01 component has been placed within a new component and scaled to 60px with the ‘k’ scaling tool. As you can see in the video, when the inner icon instance is swapped within the parent instance, the scaling is maintained and the capsules are correctly scaled. This is the expected behaviour.
But, when performing the same operation from a child instance, the scaling is lost and the capsules are rendered much larger than expected.
Is this a Figma bug or is there a way to do this?
I’ve heard workarounds of using the ‘scale’ constraints all the way down, but 1) it hasn’t worked for me, and 2) it shouldn’t be necessary as the top-level scaling should cascade down (as it does within the parent component).