gulp/webpack 项目的某个模块在编译 stylus 时为 @media 设置了额外的 0\\0 空间

Some module of a gulp/webpack project sets extra spaces for 0\\0 for @media when compiling stylus

gulp/webpack 项目的某些模块在将手写笔编译为 css

时为 @media 设置了 0[=23=] 的空间
all and (min-width:0[=11=]) and (min-resolution:.001dpcm)

这是我得到的:

@media all and (min-width: 0 \ 0) and (min-resolution: 0.001dpcm) {

0 \ 0 无效,只有 0[=23=] 有效!哪个模块可以添加这些额外的空间? 以及如何消除它们?有没有可能你强迫它按照我写的方式使用媒体字符串?

这是我的一些项目模块:

"eslint-loader": "^1.1.1",
"gulp-combine-mq": "^0.4.0",
"gulp-cssnano": "^2.0.0",
"gulp-filter": "^3.0.1",
"gulp-group-css-media-queries": "^1.1.0",
"gulp-stylint": "^3.0.0",
"gulp-stylus": "^2.1.0",
"merge-stream": "^1.0.0",
"stylint-stylish": "^1.2.0",
"stylus": "^0.54.5",

您可以使用 css literal 来防止手写笔改变您的规则:

@css{
  @media all and (min-width:0[=10=]) and (min-resolution:.001dpcm){
    //your css code here
  }
}

你会得到:

 @media all and (min-width:0[=11=]) and (min-resolution:.001dpcm){
   //your css code here
 }

你也可以使用插值法:

@media all and ({"min-width:0[=12=]"}) and (min-resolution:.001dpcm)