$ cnpm install insert-styles
Insert CSS styles into an HTML document
$ npm install --save insert-styles
var insertStyles = require('insert-styles')
insertStyles('h1 { font-size: 14px }')
//=> <head><style> h1 { ... }</style></head>
insertStyles(styles, [options]) -> voidRequired. The string of styles to insert into the DOM.
Calling insertStyles with the same options.id multiple times will re-use the same <style> element each time.
MIT © Ben Drucker
Copyright 2013 - present © cnpmjs.org | Home |