Up-to-date alternative https://github.com/RadValentin/postcss-prefix-selector
PostCSS plugin Prepend selector for each rule.
.foo {
/* Input example */
}
.foo, .bar {
/* Input example */
}
.selector .foo {
/* Output example */
}
.selector .foo, .selector .bar {
/* Output example */
}
postcss([ require('postcss-prepend-selector')( { selector: '.selector ' } ) ])
See PostCSS docs for examples for your environment.