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
  057fa0b5_7e72_3b4b_313f_268c9a7cf980["CanonicalizeOptions"]
  f6c14bbb_2e42_58cc_18f1_c89a243da9c0["canonicalize-candidates.ts"]
  057fa0b5_7e72_3b4b_313f_268c9a7cf980 -->|defined in| f6c14bbb_2e42_58cc_18f1_c89a243da9c0
  style 057fa0b5_7e72_3b4b_313f_268c9a7cf980 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