This is a fork of postcss-selector-replace and is used on our projects at Modern Tribe.
postcss.config.js
module.exports = {
plugins: [
require('postcss-selector-replace')({
"before": ["[base]", "[test]"],
"after": ["^", "~"]
})
]
}
before.css
[base]contentpage {
background-color: red;
}
after.css
^contentpage {
background-color: red;
}