1.0.2 • Published 3 years ago
postcss-unit-replace v1.0.2
postcss-unit-replace
PostCSS plugin to replace the css value
postcss([require('postcss-unit-replace')])/* before */
.foo {
height: 12cc;
}
/* after */
.foo {
height: 12px;
}Options
interface Options {
before?: string
after?: string
}Use with Options
postcss([require('postcss-unit-replace')])({
after: 'qq', // By default, it is 'cc'
before: 'pt', // By default, it is 'px'
})/* before */
.foo {
height: 12qq;
}
/* after */
.foo {
height: 12pt;
}Installation
npm install --save-dev postcss postcss-unit-replaceUsage
See PostCSS docs for examples for your environment (webpack, gulp, grunt).