postcss-tag-prefixer
v1.0.1
Published
Replaces tag names in css files with classes
Downloads
7
Maintainers
Readme
postcss-tag-prefixer
PostCSS plugin which replaces tag names with classes.
a b c,
d e f[g] {}
↓
.b-a .b-b .b-c,
.b-d .b-e .b-f[g] {}
Installation
npm install postcss-tag-prefixer
API
var postcssTagPrefixer = require('postcss-tag-prefixer');
postcssTagPrefixer({prefix: String})
Return: Function
It converts tr td
into .prefix-tr .prefix-td
.
var postcss = require('postcss');
var postcssTagPrefixer = require('postcss-tag-prefixer');
postcss()
.use(postcssTagPrefixer({prefix: 'prefix-'}))
.process('tr td')
.css;
//=> '.prefix-tr .prefix-td'
License
Licensed under the MIT License.