github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/test/integration/test-fixtures/npm-lock/node_modules/insert-css/readme.markdown (about)

     1  # insert-css
     2  
     3  insert a string of css into the `<head>`
     4  
     5  [![browser support](https://ci.testling.com/substack/insert-css.png)](https://ci.testling.com/substack/insert-css)
     6  
     7  # example
     8  
     9  ``` js
    10      var insertCss = require('insert-css');
    11      var styleElement = insertCss('body { background:blue; }');
    12  ```
    13  
    14  # api
    15  
    16  ``` js
    17      var insertCss = require('insert-css');
    18  ```
    19  
    20  ## var styleElement = insertCss(css, opts);
    21  
    22  Insert some CSS into the page.
    23  
    24  * `opts.container` - Which HTMLElement to use as the base mounting point, defaults to
    25  `document.querySelector('head')`.
    26  
    27  * `opts.prepend` - Add the CSS at the top level of the container instead of at the bottom level (default).
    28  
    29  This is particullary useful for library creators where you may want your default CSS to be prepended so it
    30  can be easily overriden by user styles.
    31  
    32  # development
    33  
    34  ## example
    35  
    36  ``` sh
    37  npm run example
    38  ```
    39  
    40  ## test
    41  
    42  ``` sh
    43  npm test
    44  ```