MCPcopy Create free account
hub / github.com/JacobLinCool/LeetCode-Stats-Card / css

Function css

packages/core/src/exts/font.ts:75–89  ·  view source on GitHub ↗
(fonts: { name: string; base64?: string | null }[])

Source from the content-addressed store, hash-verified

73}
74
75function css(fonts: { name: string; base64?: string | null }[]): string {
76 let css = "";
77 for (const font of fonts) {
78 if (!font.base64) {
79 continue;
80 }
81 css += `@font-face {font-family:"${font.name}";src:url("${font.base64}") format("woff2")}`;
82 }
83 css += `*{font-family:${fonts
84 .map((font) =>
85 ["monospace", "sans-serif", "sans"].includes(font.name) ? font.name : `"${font.name}"`,
86 )
87 .join(",")}}`;
88 return css;
89}

Callers 1

FontExtensionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected