Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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: {
[selector: string]: Record<string, string | number> | string;
}
): string;
§
formatStylesheet(stylesheet: {
[selector: string]: Record<string, string | number> | string;
}
): string
[src]

§Parameters

§
stylesheet: {
[selector: string]: Record<string, string | number> | string;
}
[src]

§Return Type

§
string
[src]