1. style-inject
Inject style tag to document head.
style-inject
Package: style-inject
Created by: egoist
Last modified: Mon, 27 Jun 2022 01:29:12 GMT
Version: 0.3.0
License: MIT
Downloads: 2,916,015
Repository: https://github.com/egoist/style-inject

Install

npm install style-inject
yarn add style-inject

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin