I’ve created a component that contains a set of icons, where each icon is a variant.
I can create instances and resize the instances and that works well. But if I change the size of the instance and then change the variant, the icon itself reverts to it’s original size.
Hi,
If you place the icon in an autolayout container and set the icon to fill the container, you should be able to resize the container (and consequently resize the icon inside it) without any resets after switching between icon variations. Component scaling problem_containerSolution.penpot (525.0 KB)
It doesn’t work for me with the file ‘Component scaling problem_containerSolution.penpot’.
We can resize ‘iconContainer’ (even if the ratio is not preserved), but if we switch the ‘icon’ variant, the size is not preserved either…
You’re right. When I created the file, everything worked perfectly. Perhaps an update changed something. I noticed some strange behavior, which isn’t exactly a workaround, but it makes the process work!
The attached images contain a simple and short guide.