Skip to main content

Allow expressions for any property where a variable is used

  • April 22, 2024
  • 2 replies
  • 148 views

For example imagine that I have these 2 token variables:
page.margin = 16
icon.padding = 10
and that I have a component that contains an icon with the padding. To ensure the icon aligns vertically I need my component to have a margin of 6, but only because the icon already contains 10 padding.

Therefore, to make my design using tokens I need to specify the padding as: page.margin - icon.padding = 6.

I do not want to use the value 6 directly as then when tokens are updated the design will not be.

This is related to Using expression as a variable's value but not the same.

To support tokens for measurements this is essential.

2 replies

  • Figmate
  • 1821 replies
  • April 23, 2024

Hi @Carson_Holzheimer, Thanks for sharing your thoughts and for taking the time to explore our community for similar topics - your efforts are truly appreciated!

I totally understand that your suggestion would be beneficial for other community members as well.
We use votes to understand what our community is most interested in and this helps us prioritize our actions. We can’t wait to see how everyone else feels about your idea! So, be sure to give it a thumbs up.

Appreciate your valuable input in our community!

Thanks,


Robin_Williams2

I second, third, fourth, fifth, sixth this feature.


Reply


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