insert-styles
Insert CSS styles into an HTML document
Last updated 4 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install insert-styles 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.1                                ...           latest (4 years ago)

4 Versions

  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 21
Dependencies (0)
None
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |