Skip to content

spacings vs space #3600

Answered by SiTaggart
mannehedlund asked this question in General
Discussion options

You must be logged in to vote

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 is spacings.

For the Emotion Theme we add some extra stuff, slightly different buckets, and rename spacing to space

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 acknowledges space.

We actually have two transform methods in twilio-paste/theme for this reason. generateThemeFromTokens and generateTokensFromTheme.

We don't really docum…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mannehedlund
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants