MCPcopy
hub / github.com/tailwindlabs/tailwindcss / toCss

Function toCss

packages/tailwindcss/src/value-parser.ts:41–56  ·  view source on GitHub ↗
(ast: ValueAstNode[])

Source from the content-addressed store, hash-verified

39}
40
41export function toCss(ast: ValueAstNode[]) {
42 let css = ''
43 for (const node of ast) {
44 switch (node.kind) {
45 case 'word':
46 case 'separator': {
47 css += node.value
48 break
49 }
50 case 'function': {
51 css += node.value + '(' + toCss(node.nodes) + ')'
52 }
53 }
54 }
55 return css
56}
57
58const BACKSLASH = 0x5c
59const CLOSE_PAREN = 0x29

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected