style-inject

Inject style tag to document head.

MIT 8 个版本
安装
npm install style-inject
yarn add style-inject
pnpm add style-inject
bun add style-inject
README

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

版本列表
0.3.0 2018-01-31
0.2.1 2018-01-15
0.2.0 2017-10-16
0.1.2 2017-07-12
0.1.1 2016-09-07
0.1.0 2016-09-02
0.0.11 2015-12-07
0.0.1 2015-12-07