MCPcopy Create free account
hub / github.com/chakra-ui/panda / parse

Function parse

packages/generator/src/artifacts/css/token-css.ts:171–181  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

169}
170
171const parse = (str: string) => {
172 try {
173 return postcss.parse(str)
174 } catch (error) {
175 if (error instanceof CssSyntaxError) {
176 logger.error('tokens:process', error.showSourceCode(true))
177 } else {
178 logger.caughtError('tokens:process', 'Failed to parse token CSS', error)
179 }
180 }
181}
182
183export function cleanupSelectors(css: string, varSelector: string) {
184 // Ignore if invalid CSS

Callers 1

cleanupSelectorsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected