style-tag

0.1.1 • Public • Published

style-tag

Create <style> elements dynamically in the browser.

Install

$ npm install style-tag

Use Browserify.

Usage

var styletag = require('style-tag');

// create a <style> tag and return it
// Arg is the initial CSS
var tag = styletag('h1 { color: red; }');

// update the CSS
tag.set('h1 { color: green; }');

// destroy the stylesheet
tag.destroy();

License

MIT.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    557
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    557
  • 0.1.0
    3
  • 0.0.1
    187
  • 0.0.0
    2

Package Sidebar

Install

npm i style-tag

Weekly Downloads

149

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jaz303