Fetches CSS from a remote link and creates a CSSStyleSheet out of it using createStyle.
The link to load the CSS from
Optional
The request init used with fetch
fetch
A promise that resolves to a CSSStyleSheet.
import { loadStyle } from 'deleight/css'const cssStyleSheet = await loadStyle('component1.css'); Copy
import { loadStyle } from 'deleight/css'const cssStyleSheet = await loadStyle('component1.css');
Fetches CSS from a remote link and creates a CSSStyleSheet out of it using createStyle.