formatStylesheet
import { formatStylesheet } from "https://raw.githubusercontent.com/Hatscat/MetavaScript/main/index.ts";
generates a CSS Stylesheet ready to be inserted in a Style tag (or nested)
@example
// returns "*:hover{padding-left:4}div{display:flex;justify-content:center}.center{text-align:center}@media(orientation:portrait){#root>*{flex-direction:column}}"
formatStylesheet({
"*:hover": { paddingLeft: 4 },
div: { display: "flex", justifyContent: "center" },
".center": { textAlign: "center" },
"@media(orientation:portrait)": formatStylesheet({
"#root>*": {
flexDirection: "column",
},
}),
})
function formatStylesheet(stylesheet: {}): string;
[selector: string]: Record<string, string | number> | string;