insert a string of css into the <head>
api    var insertCss = require('insert-css');
    var styleElement = insertCss('body { background:blue; }');
var styleElement = insertCss(css, opts);    var insertCss = require('insert-css');
Insert some CSS into the page.
opts.container
- Which HTMLElement to use as the base mounting point, defaults to document.querySelector('head')
.
opts.prepend
- Add the CSS at the top level of the container instead of at the bottom level (default).
This is particullary useful for library creators where you may want your default CSS to be prepended so it can be easily overriden by user styles.
development exampletestnpm run example
npm test
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4