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

Dependency Diagram

graph TD
  8fca809e_6cc9_4657_b675_ed19c6398fa8["CanonicalizeOptions"]
  7d350d81_5de1_f9f3_5b2c_19ec8fd3c37e["canonicalize-candidates.ts"]
  8fca809e_6cc9_4657_b675_ed19c6398fa8 -->|defined in| 7d350d81_5de1_f9f3_5b2c_19ec8fd3c37e
  style 8fca809e_6cc9_4657_b675_ed19c6398fa8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

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
}

Frequently Asked Questions

What is the CanonicalizeOptions type?
CanonicalizeOptions is a type/interface in the tailwindcss codebase, defined in packages/tailwindcss/src/canonicalize-candidates.ts.
Where is CanonicalizeOptions defined?
CanonicalizeOptions is defined in packages/tailwindcss/src/canonicalize-candidates.ts at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free