load-css
Dynamically loads CSS into the document head.
Last updated 7 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install load-css 
SYNC missed versions from official npm registry.

load-css

Dynamically loads CSS into the document head.

var loadCSS = require('load-css');
var css = [
  'div {'
, ' color: green;'
, '}'
].join('\n')

loadCSS.(css);

Installation

npm install load-css

API

####loadCSS(css)

/**
 * Loads the given css string into the document head as an inlined script.
 * 
 * @name loadCSS
 * @function
 * @param css {String} the css to load
 */

Examples

You can run the examples via the following commands:

  • npm run demo-string demonstrates how to load a css string

License

MIT

Current Tags

  • 0.1.0                                ...           latest (7 years ago)

2 Versions

  • 0.1.0                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |