Hey! I feel stupid for asking this question, but I just can’t - for the love of god - figure it out.
I have multiple icons and I have a button, in which I want to use the icons. Each icon is composed from one shape with the same color and layer name.
What I’m trying to do is:
Insert the icon (instance) into the button (symbol)
Change the icon fill
Create new button instance
Swap the icon (in the button instance) for a different one
The icon fill override I previously changed in button symbol should still be here
I found a video, where it works flawlessly. The guy has symbol with nested icon, all of his icons are black but when swapped, they are blue. Exactly what I need!
I also have one video of my own, doing the exact same thing and failing miserably
I just don’t know how to do it, I tried to figure it out and failed. Could you please help me? Thank you in advance!
Actually I think I see what might be going on here in your video. I think it’s because you’re overriding the fill color in the symbol source for the button (on the left) but then swapping the nested symbol of the square on an instance of the button (on the right). Try overriding the color of the square on the instance of the button (the one on the right) and then swapping the nested symbol of the square.
When I change the color on the button instance (not the source), it works. But what I’m trying to do is to change the icon fill directly in the button source and then never worry about it again.
Currently, I would need to manually override the icon fill each time I would want to use the button with other than default icon.
That’s a great question. I’m pretty certain Sketch will only pass along an override when swapping a symbol at the same exact “level” the override was applied to. What you’re trying to accomplish here makes a ton of sense to me — and there’s no way you’re alone. I’ll pass this along to our engineers and see if this is an area we can improve upon or if it’s more of a stubborn shortcoming of the underlying architecture.