Guides & Compatibility Source release: v1.1.0 • SHA: cee51abe

CoherynUI — Migration & Compatibility Guide v1.0

Status: Approved Documentation


1. Migration Philosophy

Migration from legacy utility frameworks is designed as an onboarding tool, ensuring zero friction while preserving clean semantic architecture.

To prevent accidental code corruption, migration tooling operates under a dry-run and patch generation model:

coherynui migrate --from legacy-css --dry-run

The command analyzes project sources, flags ambiguities, and emits a structured git patch or diff report rather than silently overwriting source files.


2. Key Conceptual & Naming Differences

CategoryLegacy Utility ParadigmCoherynUI Canonical ParadigmRationale
Text Colortext-slate-900fg-primary / fg-mutedDecouples color intent from raw scale names. Distinct from font size (text-lg).
Font Sizetext-xltext-xlPreserves familiar scale for font sizing.
Font Weightfont-boldweight-boldAligns directly with CSS font-weight.
Border Radiusrounded-xlradius-xlAligns with CSS border-radius and token catalog ([tokens.radius]).
Materialsbg-white/50 backdrop-blur-mdglass / glass-strongMulti-declaration recipe with automatic high-contrast opaque fallbacks and WebGPU hooks.
Container Queries@container, @lg:grid-cols-2cq-root, cq-lg:cols-2Explicit containment roots and predictable container query threshold variants.
Adaptive LayoutsAd-hoc flex/grid chainsstack, cluster, grid-auto, sidebarIntrinsic CSS recipes that handle common layout topologies with zero media queries.

3. Step-by-Step Migration Process

  1. Initialize CoherynUI Configuration:
    coherynui init
    
  2. Run Static Analysis:
    coherynui check --strict
    
    CoherynUI flags unrecognized classes and emits actionable suggestions (e.g. Suggest: replace rounded-xl with radius-xl).
  3. Verify Build Determinism:
    coherynui build --input src --output dist/coherynui.css