spacings vs space #3600
-
Hi team, I have a question regarding the usage of "spacings" vs "space" and "sizings" vs "size" in Paste. In Flex UI (we're on Paste v15), we consume the "spacings" and "sizings" objects you export as part of your theme. However, it was noticed that if you use https://remix.twilio.design/spacing and click export, the "space30" property lives under a "space" object, not "spacings". I'm wondering what the reason for this inconsistency is? And if there's a mapping documented somewhere? Any insight would be appreciated. Thanks 😃 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
I can see where the is confusion coming from. Flex consumes Design Tokens, which has a slightly different shape to the Theme which we pass to the Theme Provider. In Design Tokens we have fewer keys, and For the Emotion Theme we add some extra stuff, slightly different buckets, and rename It's done for some constraints we have in the system and third parties we use. Theo our design token processor only acknowledges We actually have two transform methods in We don't really document it because it's kind of rare to just consume Design Tokens when, what you really need comes from |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation. |
Beta Was this translation helpful? Give feedback.
-
Reopening just in case a future someone has a question about this. |
Beta Was this translation helpful? Give feedback.
Hi @mannehedlund
I can see where the is confusion coming from. Flex consumes Design Tokens, which has a slightly different shape to the Theme which we pass to the Theme Provider.
In Design Tokens we have fewer keys, and
space
isspacings
.For the Emotion Theme we add some extra stuff, slightly different buckets, and rename
spacing
tospace
It's done for some constraints we have in the system and third parties we use. Theo our design token processor only acknowledges
spacings
, and Styled System our theming solution only acknowledgesspace
.We actually have two transform methods in
twilio-paste/theme
for this reason.generateThemeFromTokens
andgenerateTokensFromTheme
.We don't really docum…