Skip to content

Can "panda CSS" resolve dynamic props? #993

Closed Answered by astahmer
Kazuhiro-Mimaki asked this question in Q&A
Discussion options

You must be logged in to vote

the extractor is smart enough to extract both condition branches when the condition expression is unresolvable statically, https://panda-css.com/docs/guides/dynamic-styling#runtime-conditions

so, in this example, both "red" and "black" are extracted and will be generated, cause we can't know at build-time which one should be used
https://play.panda-css.com/_Zbe0snK6h

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anubra266
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