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 I create a style that contains conditions for a specific theme and mode, I expect the element to be styled appropriately.
Multi-Theme Tokens https://play.panda-css.com/tSFQVNcX_t
Multi-Theme https://play.panda-css.com/UvRRJln-EQ
Tokens
[data-theme="pink"][data-color-mode="dark"]
<div data-theme="primary" data-color-mode="dark"> <div className={css({ _blueTheme: { color: { base: 'red', _dark: 'yellow' } } })} > </div>
Utility
[data-color-mode="dark"] [data-theme="blue"] .blueTheme\:dark\:c_yellow { color: yellow; }
Produced CSS: [data-color-mode="dark"] [data-theme="blue"] ❌
[data-color-mode="dark"] [data-theme="blue"]
Desired CSS: [data-color-mode="dark"][data-theme="blue"] ✅
[data-color-mode="dark"][data-theme="blue"]
No response
0.53.0
I can make additional conditions that properly match based on theme and mode:
conditions: { light: '[data-color-mode=light] &', dark: '[data-color-mode=dark] &', primaryTheme: '[data-theme=primary] &', secondaryTheme: '[data-theme=secondary] &', darkPrimary: '[data-theme=primary][data-color-mode=dark] &', // Extra condition darkSecondary: '[data-theme=secondary][data-color-mode=dark] &' // Extra condition }
However, something feels off about how the conditions work as expected when generating the Token CSS and how the Utilities are generated in code.
Token
Utilities
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When I create a style that contains conditions for a specific theme and mode, I expect the element to be styled appropriately.
Link to Reproduction
Multi-Theme Tokens
https://play.panda-css.com/tSFQVNcX_t
Multi-Theme
https://play.panda-css.com/UvRRJln-EQ
Steps to reproduce
Tokens
CSS contains the proper selector[data-theme="pink"][data-color-mode="dark"]
targeting a single element.Utility
CSS that is generated is:Produced CSS:
[data-color-mode="dark"] [data-theme="blue"]
❌Desired CSS:
[data-color-mode="dark"][data-theme="blue"]
✅JS Framework
No response
Panda CSS Version
0.53.0
Browser
No response
Operating System
Additional Information
I can make additional conditions that properly match based on theme and mode:
However, something feels off about how the conditions work as expected when generating the
Token
CSS and how theUtilities
are generated in code.The text was updated successfully, but these errors were encountered: