windicss/svelte-windicss-preprocess

darkmode config does not work as configured

philippdormann opened this issue · 2 comments

Describe the bug

not sure if it's my fault, but the darkmode config is not working when setting to darkMode: 'media'

the classes generated are only prefixed with .dark instead of wrapped within @media (prefers-color-scheme: dark) {

clean reproduction repo here

stackblitz reproduction here

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (6) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
    Memory: 15.50 GB / 31.94 GB
  Binaries:
    Node: 17.0.1 - ~\AppData\Local\Volta\tools\image\node\17.0.1\node.EXE
    Yarn: 1.22.11 - ~\AppData\Local\Volta\tools\image\yarn\1.22.11\bin\yarn.CMD
    npm: 8.1.0 - ~\AppData\Local\Volta\tools\image\node\17.0.1\npm.CMD
  Browsers:
    Chrome: 95.0.4638.69
    Edge: Spartan (44.22000.120.0), Chromium (95.0.1020.53), ChromiumDev (93.0.910.5)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    svelte: 3.44.1 => 3.44.1
    svelte-windicss-preprocess: 4.1.6 => 4.1.6

Used Package Manager

yarn

Thanks for the report. I will try to reproduce this issue, however I don't have it in my repos.

Sorry for coming back lately. But I think you miss to define the configPath in your windi({}) call