MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / getCollectedCSS

Function getCollectedCSS

packages/backend/src/html/htmlMain.ts:138–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137// Get the collected CSS as a string with improved formatting
138export function getCollectedCSS(): string {
139 if (Object.keys(cssCollection).length === 0) {
140 return "";
141 }
142
143 return Object.entries(cssCollection)
144 .map(([className, { styles }]) => {
145 if (!styles.length) return "";
146 return `.${className} {\n ${styles.join(";\n ")}${styles.length ? ";" : ""}\n}`;
147 })
148 .filter(Boolean)
149 .join("\n\n");
150}
151
152// Generate styled-components with improved naming and formatting
153export function generateStyledComponents(): string {

Callers 1

htmlMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected