https://github.com/benignware/css-wrap
Wrap CSS rules in a namespace
https://github.com/benignware/css-wrap
Last synced: 11 months ago
JSON representation
Wrap CSS rules in a namespace
- Host: GitHub
- URL: https://github.com/benignware/css-wrap
- Owner: benignware
- Created: 2015-07-08T18:37:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T07:54:33.000Z (about 7 years ago)
- Last Synced: 2025-07-01T10:48:07.229Z (12 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# css-wrap
> Wrap CSS rules in a namespace
## Install
```shell
npm install grunt-css-wrap --save-dev
```
## Usage
`csswrap(string|file, options)`
```js
var
css_wrap = require('css-wrap'),
output = css_wrap('.some-css-selector { background: green; }', {
selector: '.my-app'
});
console.log(output)
// .my-app .some-css-selector {
// background: green;
// }
```
## Options
#### options.selector
Type: `String`
Default value: `.css-wrap`
Provide a namespace selector in which to wrap CSS.
#### options.skip
Type: `Regular expression`
Default value: `null`
Skip css rules by regular expressions
## Changelog
v0.0.1 - Initial Release
v0.0.2 - Added options.skip