unpreset / unocss-preset-theme

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

Apply theme based on media query #38

Open silveltman opened 1 year ago

silveltman commented 1 year ago

Awesome plugin!

Is it possible to apply a theme based on a mediaquery? So a different theme for mobile vs desktop.

Dunqing commented 1 year ago

Thanks, yes, it has been supported and if you encounter any problems, please feel free to let me know.

silveltman commented 1 year ago

How could I do this then? It doesn't say it in the documentation.

Dunqing commented 1 year ago

Sorry, I may have misunderstood. You meant to take effect in a different screen size. I think we can just use sm: md: lg: etc...

silveltman commented 1 year ago

Ah I see. Yes I meant it to take effect on different screensizes.

This is very usefull for font-sizes for example. Ofcourse I can also make UnoCSS shortcuts to apply both a text:lg and lg:text-xl for example

Dunqing commented 1 year ago

Okay, I get it, I'm not quite sure we can do it yet.