Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/stackcss/postcss-prefix
- Owner: stackcss
- License: other
- Created: 2015-10-26T22:43:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-19T11:13:46.000Z (over 4 years ago)
- Last Synced: 2024-11-11T20:33:26.444Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 4
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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)