css-prefixer
prefixing css using rework
Getting Started
npm install --save css-prefixer
Once the package has been installed, it may be required with this line of JavaScript:
var prefixer = ;
Overview
Below is a basic example
example.css
@-}{}
code:
var fs = ;var css = fsvar options= prefix: 'pre-' ; var result = ; console
result:
@-}{}
Options
options.prefix
Type: String
Default value: ''
Prefix any class name/id selector in the target file with this prefix.
options.ignore
Type: [ '' ]
Default value: [ '{options.prefix}' ]
An array of strings that will ignore selector names once it starts with any of the provided strings. The provided prefix is always added to this list by default.
options.processName
Type: String
Default value: null
process the prefixed class name with any of underscore.string methods
options.prefixIdSelectors
Type: Boolean
Default value: true
When true will prefix id selectors in the css.
What this library doesn't do currently
- Add vendor prefixes
- Attribute selectors are not prefixed eg.
[class=*"the-class-name"]
Credits
- To the author of grunt-css-prefix
Development
- Pull requests are welcome
- Only one commit will be accepted into master, please squash commits
Release History
- 0.1.0: initial usage
- 0.1.1: documentation update
- 0.1.2: documentation update
- 0.1.3: npm publish cleanup