npm.io
1.0.1 • Published 7 years ago

@kushnarang/css

Licence
MIT
Version
1.0.1
Deps
0
Size
9 kB
Vulns
0
Weekly
0
Stars
1

css

Simple CSS addition from JavaScript.

Importing

  1. Download the css.min.js and host it yourself (preferred)
  2. Use a public CDN such as jsdelivr https://cdn.jsdelivr.net/npm/@kushnarang/css@1.0.0/dist/css.min.js (not preferred)

Usage

The one and only parameter is the CSS you want to add (in the form of a string).


css("body { background: purple }");

// or

css("#header { color: red }");

// or

// whatever CSS you want
Compatablity
Internet Explorer 9+
Chrome 4+
Firefox 3+
Safari 4+

Keywords