Function createStyle

  • Creates a CSSStyleSheet from markup text.

    Parameters

    • style: string

      The CSS text

    Returns CSSStyleSheet

    The CSSStyleSheet instance

    Example

    import { createStyle } from 'deleight/css'
    const css = `
    .hd {
    background-color: navy;
    color: white;
    }
    `;
    const cssStyleSheet = createStyle(css);