Inject style tag to document head.
npm install style-inject
import styleInject from 'style-inject';
const css = `
body {
margin: 0;
}
`;
styleInject(css, options);
Type: string
Possible values: top
Default: undefined
Insert style
tag to specific position of head
element.
Type: string
Possible values: any value that can be passed to head.querySelector
Default: undefined
Insert style
tag to above a specific tag in the head
element.
MIT © EGOIST