Skip to main content
Question

Variable paddings not updating correctly when changing nested component variant

  • July 4, 2023
  • 1 reply
  • 293 views

I have a nested component X within a parent component Y. Component X has its padding values set to variables, and different variants of X have different padding values. Component X works as expected on it’s own.

The issue is, within component Y, when I change component X’s variant, it doesn’t update X’s padding values correctly. They’re fixed at whatever the initial value was when I nested X within Y. This happens if you try to update X in either the master Y OR an instance Y.

An example here, initially the padding is set correctly to a variable of 16px for the variant of X that I nest within Y. However, when I change X to a ‘heading only’ variant it should update to 12px padding but it remains at 16px:

I’ve validated that component X works correctly when not nested within Y, and that there are no other variable modes set that could be causing a side effect here.

Also strangely, if I recreate a new Y parent component and nest X within it, it works fine. However, my original Y is in widespread use across lots of different files and prototypes so I’m reluctant to go replacing it everywhere. I’m not sure if it’s an issue with variables not being fully backwards-compatible with components that were created before the variables release…

This topic has been closed for comments

1 reply

  • 0 replies
  • August 3, 2023

This topic was automatically closed after 30 days. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings