Neolithic Populous Metropolis
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    load-csspublic

    load-css

    testling badge

    Dynamically loads CSS into the document head.

    var loadCSS = require('load-css');
    var css = [
      'div {'
    , ' color: green;'
    , '}'
    ].join('\n')
     
    loadCSS(css);

    Installation

    npm install load-css
    

    API

    loadCSS(css)

    /**
     * Loads the given css string into the document head as an inlined script.
     * 
     * @name loadCSS
     * @function
     * @param css {String} the css to load
     */

    Examples

    You can run the examples via the following commands:

    • npm run demo-string demonstrates how to load a css string
    • npm run demo-filw demonstrates how to load a css file using the brfs browserify transform

    License

    MIT

    Keywords

    none

    install

    npm i load-css

    Downloadslast 7 days

    2,217

    version

    0.1.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar