Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

loadstyle-bits

Load css style into DOM

bit-loader

readme

loadstyle-bits

bit-imports plugin for loading css into the DOM.

You can configure this module to embed the css in a style tag or to use links.

Use links for better livereload support.

Install

$ npm install loadstyle-bits --save

Options

  • embedded (false) - flag that tells loadstyle-bits to embed css in style DOM nodes.

Example

var loadstyle = require("loadstyle-bits");

loadstyle({
  path: "http://localhost/path/to/some.css"
});

The following example is to embed css in style DOM nodes.

var loadstyle = require("loadstyle-bits");

loadstyle({
  source: "body { color: #938484; }"
}, {
  embedded: true
});

License MIT