Skip to content

aotuzuche/dmvars-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

css暗黑模式快速生成的loader

用法:与css-loader、style-loader等loader一样配置到webpack中。注意顺序,要先处理该loader,将dmvars进行转换

例子:

body {
  background-color: dmvars(white, black);
}

经该loader转换后得到:

:root {
  --dmvars-3KmhiwoM: white;
}

@media (prefers-color-scheme: dark) {
  :root {
    --dmvars-3KmhiwoM: black;
  }
}

body {
  background-color: var(--dmvars-3KmhiwoM);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published