Home / Function/ toCss() — tailwindcss Function Reference

toCss() — tailwindcss Function Reference

Architecture documentation for the toCss() function in selector-parser.ts from the tailwindcss codebase.

Entity Profile

Relationship Graph

Source Code

packages/tailwindcss/src/selector-parser.ts lines 70–87

export function toCss(ast: SelectorAstNode[]) {
  let css = ''
  for (const node of ast) {
    switch (node.kind) {
      case 'combinator':
      case 'selector':
      case 'separator':
      case 'value': {
        css += node.value
        break
      }
      case 'function': {
        css += node.value + '(' + toCss(node.nodes) + ')'
      }
    }
  }
  return css
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free