Replies: 1 comment
-
hey !
indeed, that's the recommended way of working with
most likely not, as the CSS syntax is quite complex/flexible another issue with this is the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I'd like to turn on
strictTokens
for my codebase to enforce usage of our predefined tokens, but I've discovered one issue that is giving me second thoughts. WithstrictTokens
enabled and tokens defined for a shorthand property likepadding
that can take multiple values of the same token, the resulting TypeScript types enforce that only a single value is passed.Obviously something like
padding: 'spacing-01 spacing-02';
can be split into the constituent longhand properties, but it'd be nice to continue to be able to use shorthand properties with token usage enforcement. Would this be straightforward to support?Using TypeScript's template literal types might allow this, by producing a type like this:
Thanks in advance for your thoughts!
Link to Reproduction
https://play.panda-css.com/XVgcP2KLdx
Steps to reproduce
padding
propertyJS Framework
React, TS
Panda CSS Version
0.40.1
Browser
No response
Operating System
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions