postcss-tag-prefixer

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i postcss-tag-prefixer

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • azproduction