We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When strictTokens is set to true, using opacity modifiers like red.500/40 produces a TypeScript error:
strictTokens
true
red.500/40
see additional information
strictTokens: true
css({ bg: 'red.500/40' })
TS2820: Type 'red.500/40' is not assignable to type PropOrCondition<'bg', ColorToken> | undefined. Did you mean 'red.500'?
React (TS)
0.31.0
No response
I can't give you a link to a reproduction because opacity modifiers don't work at all for reproductions: Notice that the background is transparent.
The text was updated successfully, but these errors were encountered:
This is by design. We'll update the docs for the opacity modifier.
Opacity modifiers are considered a "design escape hatch" to prototype UIs quickly. The strict token mode enforces using only design tokens.
You could consider using bg: [red.700/40]
bg: [red.700/40]
Sorry, something went wrong.
No branches or pull requests
Description
When
strictTokens
is set totrue
, using opacity modifiers likered.500/40
produces a TypeScript error:Link to Reproduction
see additional information
Steps to reproduce
strictTokens: true
css({ bg: 'red.500/40' })
TS2820: Type 'red.500/40' is not assignable to type PropOrCondition<'bg', ColorToken> | undefined. Did you mean 'red.500'?
JS Framework
React (TS)
Panda CSS Version
0.31.0
Browser
No response
Operating System
Additional Information
I can't give you a link to a reproduction because opacity modifiers don't work at all for reproductions:
Notice that the background is transparent.
The text was updated successfully, but these errors were encountered: