jakeburden / postcss-prefix

Prefix CSS selectors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postcss-prefix

Replace :host elements with a prefix of your choosing

Usage

const prefix = require('postcss-prefix')
const postcss = require('postcss')

const css = `
  :host { color: blue }
  .hello { color: black }
`

const newCss = postcss()
  .use(prefix('#hello-world'))
  .process(css)
  .toString()

console.log(newCss)
// => #hello-world { color: blue }
// => .hello { color: black }
`

See Also

License

MIT

About

Prefix CSS selectors

License:Other


Languages

Language:JavaScript 66.6%Language:CSS 33.4%