(nodes: CssNode[])
| 46 | }; |
| 47 | |
| 48 | const splitRepeated = (nodes: CssNode[]) => { |
| 49 | const lists: Array<CssNode[]> = [[]]; |
| 50 | for (const node of nodes) { |
| 51 | if (node.type === "Operator" && node.value === ",") { |
| 52 | lists.push([]); |
| 53 | } else { |
| 54 | lists.at(-1)?.push(node); |
| 55 | } |
| 56 | } |
| 57 | return lists; |
| 58 | }; |
| 59 | |
| 60 | const cssNumericFunctionNames = new Set([ |
| 61 | "calc", |