Multiple Themes using a data attribute vs a class name #2443
-
Was doing some poking around and saw that the // example code
const conditions = {
pinkTheme: '[data-theme=pink] &',
blueTheme: '[data-theme=blue] &'
};
// panda-base
const conditions = {
dark: ' &.dark, .dark &',
light: ' &.light, .light &',
} I imagine you are suggested this methodology to avoid having to create an entry for each color mode like below: const conditions: {
pinkTheme: '[data-theme=pink] &',
pinkDarkTheme: '[data-theme=pink-dark] &',
blueTheme: '[data-theme=blue] &'
blueDarkTheme: '[data-theme=blue-dark] &',
} Wanted to see if you all saw an advantage over one or the other? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@jimmymorris This is something left to you (your design system). It depends on what method your team decides on, the default panda preset is only configured for light and dark color modes. Which is independent of themes. |
Beta Was this translation helpful? Give feedback.
-
related: https://panda-css.com/docs/guides/multiple-themes#multi-themes |
Beta Was this translation helpful? Give feedback.
@jimmymorris This is something left to you (your design system). It depends on what method your team decides on, the default panda preset is only configured for light and dark color modes. Which is independent of themes.