Home / Type/ CanonicalizeOptions Type — tailwindcss Architecture

CanonicalizeOptions Type — tailwindcss Architecture

Architecture documentation for the CanonicalizeOptions type/interface in canonicalize-candidates.ts from the tailwindcss codebase.

Entity Profile

Source Code

packages/tailwindcss/src/canonicalize-candidates.ts lines 31–54

export interface CanonicalizeOptions {
  /**
   * The root font size in pixels. If provided, `rem` values will be normalized
   * to `px` values.
   *
   * E.g.: `mt-[16px]` with `rem: 16` will become `mt-4` (assuming `--spacing: 0.25rem`).
   */
  rem?: number

  /**
   * Whether to collapse multiple utilities into a single utility if possible.
   *
   * E.g.: `mt-2 mr-2 mb-2 ml-2` → `m-2`
   */
  collapse?: boolean

  /**
   * Whether to convert between logical and physical properties when collapsing
   * utilities.
   *
   * E.g.: `mr-2 ml-2` → `mx-2`
   */
  logicalToPhysical?: boolean
}

Analyze Your Own Codebase

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

Try Supermodel Free