1.0.2 • Published 5 years ago

css-inject v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

css-inject

package version package downloads standard-readme compliant package license make a pull request Greenkeeper badge

Inject CSS rules into the head above any other stylesheets

Table of Contents

Install

This project uses node and npm.

$ npm install css-inject
$ # OR
$ yarn add css-inject

Usage

import ccInject from 'css-inject'

const rules = `
  body { background: tomato; }
  div { padding: 10px; }
`

const remove = cssInject(rules)

// To remove style again
remove()

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT