Skip to content

stackcss/postcss-prefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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([ prefix('#hello-world') ])
  .process(css)
  .toString()

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

See Also

License

MIT