unpreset / unocss-preset-theme

The dynamic theme presets for UnoCSS.
https://unocss-preset-theme.todev.cc
131 stars 11 forks source link

fix: add support for custom selectors like data-theme #63

Closed GavinXue closed 1 year ago

GavinXue commented 1 year ago

When update to version 0.9.1, the feature of controlling themes by using data-theme is no longer supported. You can refer to this repository demonstration for a better understanding: repository demo.

This PR introduces support for the following scenario.

selectors: {
  light: '[data-theme="light"]',
  dark: '[data-theme="dark"]',
},
Dunqing commented 1 year ago

Thanks!