Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stackcss/postcss-prefix

Prefix CSS selectors
https://github.com/stackcss/postcss-prefix

Last synced: about 1 month ago
JSON representation

Prefix CSS selectors

Awesome Lists containing this project

README

        

# postcss-prefix
Replace `:host` elements with a prefix of your choosing

## Usage
```js
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
- [sheetify](https://github.com/stackcss/sheetify)

## License
[MIT](https://tldrlegal.com/license/mit-license)