1.0.1 ⢠Published 10 years ago
postcss-tag-prefixer v1.0.1
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-prefixerAPI
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.