load-css
Dynamically loads CSS into the document head.
var loadCSS = ;var css = 'div {' ' color: green;' '}' ;
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 stringnpm run demo-filw
demonstrates how to load a css file using the brfs browserify transform
License
MIT