egoist / style-inject

Inject style tag to document head.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Inject style tag to document head.

License:MIT License


Languages

Language:JavaScript 100.0%