create-style

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

Usage no npm install needed!

<script type="module">
  import createStyle from 'https://cdn.skypack.dev/create-style';
</script>

README

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.