1.2.1 • Published 8 years ago

insert-styles v1.2.1

Weekly downloads
46
License
MIT
Repository
github
Last release
8 years ago

insert-styles Build Status

Insert CSS styles into an HTML document

Install

$ npm install --save insert-styles

Usage

var insertStyles = require('insert-styles')

insertStyles('h1 { font-size: 14px }')
//=> <head><style> h1 { ... }</style></head>

API

insertStyles(styles, [options]) -> void

styles

Required. The string of styles to insert into the DOM.

options
id

Calling insertStyles with the same options.id multiple times will re-use the same <style> element each time.

Related

License

MIT © Ben Drucker