create-style
TypeScript icon, indicating that this package has built-in type declarations

1.1.9 • Public • Published

createStyle

Creates style element with the css inserted to him and ready to put into the document

Usage: createStyle(css: string): HTMLStyleElement

import { createStyle } from 'create-style'

document.head.appendChild(createStyle(`
    .my-element{
    color: red;
    }
`))

This module exported from utilizes project.

Package Sidebar

Install

npm i create-style

Weekly Downloads

1

Version

1.1.9

License

MIT

Unpacked Size

2.5 kB

Total Files

5

Last publish

Collaborators

  • natqe3