Skip to content

Will using vars that import createGlobalThemeContract multiple times in a Monorepo project cause performance loss? #1277

Closed Answered by askoufis
1111mp asked this question in Q&A
Discussion options

You must be logged in to vote

To put it simply: anything inside a .css.ts file will occur only at build time. sprinkles can be run both at build time and at run time, it just depends what file you use it in. If you use sprinkles at run time, it's just doing a lookup of the classname, it's not re-creating the entire sprinkles definition.

Do you mean to introduce themeVars directly in link.css.ts? Like this:
Yes, just like the code you wrote. There's no reason to use sprinkles to access a colour when your theme variables already define it.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@1111mp
Comment options

@askoufis
Comment options

Answer selected by 1111mp
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
Category
Q&A
Labels
None yet
2 participants