Nanoscale Parts Manufacturing
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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.

Keywords

install

npm i style-tag

Downloadsweekly downloads

4

version

0.1.1

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar