@kushnarang/css

Simple CSS addition from JavaScript.


Keywords
css, styling, stylesheet
License
MIT
Install
npm install @kushnarang/css@1.0.1

Documentation

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+