1.0.1 ā€¢ Published 9 years ago

postcss-tag-prefixer v1.0.1

Weekly downloads
9
License
-
Repository
github
Last release
9 years ago

postcss-tag-prefixer

NPM version Build status Test coverage Dependency Status License

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

Use npm.

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.