Home / Function/ default.serialize() — tailwindcss Function Reference

default.serialize() — tailwindcss Function Reference

Architecture documentation for the default.serialize() function in custom-serializer.ts from the tailwindcss codebase.

Entity Profile

Relationship Graph

Source Code

packages/tailwindcss/src/test-utils/custom-serializer.ts lines 13–22

  serialize(val, config, indentation, depth, refs, printer) {
    if (typeof val !== 'string') {
      throw new Error('This was already tested in the test() callback')
    }

    let replaced = val.replaceAll(HIGH_PRECISION_COLOR_FUNCTION, (match, _, first, second) => {
      return match.replaceAll(first, first.slice(0, 3)).replaceAll(second, second.slice(0, 3))
    })
    return printer(replaced, config, indentation, depth, refs)
  },

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free