prefix-css-node

0.4.0 • Public • Published

Prefix CSS selectors

Codeship Status for radekstepan/prefix-css-node

Useful when loading say Twitter Bootstrap libraries for a widget on the page and we do not want to override the default style of that page.

Requirements

$ npm install -d

Use

The library runs synchronously.

prefix = require 'prefix-css-node'
 
css = """
body { background:pink }
a:after { content:"link", display:block }
"""
 
prefix.css css, 'bootstrap'

By default, html and body selectors are blacklisted, to change that or pass custom selectors to exclude, pass a list as the third parameter:

prefix.css css, 'bootstrap', [ 'html', 'body', 'a', '#div' ]

File IO

To input and output a file use the cake command:

$ cake --input in.css --output out.css --text gangnam prefix

Testing

$ npm test

Readme

Keywords

none

Package Sidebar

Install

npm i prefix-css-node

Weekly Downloads

0

Version

0.4.0

License

none

Last publish

Collaborators

  • radekstepan