postcss-class-rename-postcss8
v1.0.2
Published
PostCSS plugin simply rename class without hassle
Downloads
5
Maintainers
Readme
postcss-class-rename-postcss8
PostCSS plugin to replace class name by giving key-value mapping in options
Installation
npm install postcss-class-rename-postcss8 --save-dev
Usage
rollup
postcss({
plugins: [
require('autoprefixer'),
require('postcss-class-rename-postcss8')({
// replace 'button-' in class name to 'btn-'
button-: 'btn-',
// All options are treated as replacement mapping
...
})
]
}),
postcss.config.js
const rename = require('postcss-class-rename-postcss8');
module.exports = ({ env }) => {
plugins: [
rename({
// All options are treated as replacement mapping
button-: 'btn-',
...
})
]
}