style-inject
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/style-inject package

0.3.0 • Public • Published

style-inject

NPM version NPM downloads CircleCI donate chat

Inject style tag to document head.

Installation

npm install style-inject

Example

import styleInject from 'style-inject';
const css = `
  body {
    margin: 0;
  }
`;
styleInject(css, options);

Options

insertAt

Type: string
Possible values: top
Default: undefined

Insert style tag to specific position of head element.

License

MIT © EGOIST

Readme

Keywords

Package Sidebar

Install

npm i style-inject

Weekly Downloads

652,286

Version

0.3.0

License

MIT

Last publish

Collaborators

  • kchan
  • rem