css-modules / css-modulesify

A browserify plugin to load CSS Modules
MIT License
403 stars 47 forks source link

selectors are prefixed (sometimes) #116

Closed pixelass closed 6 years ago

pixelass commented 7 years ago

I have seen this several times and am unsure what causes this.

{"-webkit-box-flex":"v","-ms-flex":"v","flex":"v"/*...*/}
.flex {
  /* flex logic*/
}

I use cssnext. The resulting CSS is as expected but I get these unneeded and potentially dangerous mappings.

b.plugin(cssModulesify, {
  after: [cssNext()],
  output: `${outFile}.css`,
  jsonOutput: `${outFile}.json`,
  generateScopedName: prod ? shortid : longid,
  global: true,
  cache: {}
})
{
    "demo/slideshow.css": {
        "wrapper": "r",
        "hidden": "s",
        "visible": "t",
        "fit": "u",
        "-webkit-box-flex": "v",
        "-ms-flex": "v",
        "flex": "v",
        "fill": "w",
        "wrap": "x",
        "vertical": "y"
    }
}
"css-modulesify": "^0.28.0"
"postcss-cssnext": "^2.11.0"

https://github.com/pixelass/paraglider/blob/master/docs/index.json
https://github.com/pixelass/paraglider/blob/master/docs/index.js#L10

pixelass commented 6 years ago

Moving away from Github. Feel free to reopen if interested.