You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using multiple themes, you currently need to set both [data-color-mode=dark][data-theme=pastel] on every element to apply the correct tokens. Ideally, tokens should cascade—setting [data-color-mode=dark] at the root and [data-theme=pastel] on child elements should be sufficient. Tokens should resolve based on the closest [data-theme=...], inheriting the color mode from the root if not explicitly overridden.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using multiple themes, you currently need to set both [data-color-mode=dark][data-theme=pastel] on every element to apply the correct tokens. Ideally, tokens should cascade—setting [data-color-mode=dark] at the root and [data-theme=pastel] on child elements should be sufficient. Tokens should resolve based on the closest [data-theme=...], inheriting the color mode from the root if not explicitly overridden.
There is already a comment on https://github.com/chakra-ui/panda/blob/main/packages/generator/src/artifacts/css/token-css.ts line 79 - 82
See the following example: https://play.panda-css.com/kZ8hP0OAi4
It would be great to have at least an option to set how themes are generated.
Request that addresses a similar topic: #3145
Or is there any other way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions