WORK-423
ID:WORK-423Status:done

elevation depth-ladder axis

Turn elevation into the universal chrome/depth axis from SPEC-107: an ordered semantic ladder emitted as data-elevation, superseding both §8's surface enum and today's shadow-only none/sm/md/lg scale. The foundation the rest of the milestone builds on.

Priority:highComplexity:complexMilestone:v0.23.0Source:SPEC-107
claude/v023-batch1-foundations View source

Criteria completion

Criteria completion: 5 of 5 (100%) checked; tracking started on Jun 15, no incremental history yet0%25%50%75%100%Jun 15Jun 15

Tracking started Jun 15 — check back for trends.

Branches 3
History 1
  1. a33d6b3
    Created (done)by bjornolofandersson

Scope

  • Recognise the value set sunken | flush | flat | raised | floating (+ optional overlay) on the universal elevation axis; emit data-elevation from the engine like the other cross-rune classifications.
  • Add defaultElevation to RuneConfig (mirroring defaultWidth / defaultDensity) so the per-rune default is theme config, overridable per instance and via context/region cascade.
  • Ship a deprecation alias mapping old → new (noneflat, smraised, mdraised, lgfloating) that resolves + warns (the SPEC-086 alias pattern). none maps to flat, never flush.
  • Honor the elevationframe-shadow boundary (SPEC-107 §1): elevation is the rune surface's box-shadow depth; leave frame-shadow's own none/sm/md/lg scale untouched (separate axis, not renamed or migrated).

Acceptance Criteria

  • elevation accepts sunken | flush | flat | raised | floating (+ optional overlay) and the engine emits data-elevation="<value>".
  • defaultElevation is read from theme RuneConfig and applied when the author sets no value; per-instance values win.
  • Old values (none/sm/md/lg) resolve via a deprecation alias with a dev warning; noneflat (not flush); tests cover the mapping.
  • frame-shadow's none/sm/md/lg scale is left untouched; only the rune-surface elevation scale migrates.
  • Unit tests cover value emission, the per-rune default, and the alias.

Dependencies

  • Best after WORK-410 (the spike sets the cut line). The chrome axis other items target.

References

  • SPEC-107 · SPEC-094 §8 · packages/transform/src/engine.ts · packages/transform/src/types.ts (RuneConfig).

Resolution

Completed: 2026-06-15

Branch: claude/v023-batch1-foundations (Batch 1).

What was done

  • RuneConfig.defaultElevation added (packages/transform/src/types.ts), beside defaultWidth/defaultDensity.
  • Engine (packages/transform/src/engine.ts): elevation now resolves tag.attributes.elevation ?? config.defaultElevation and emits data-elevation (no BEM class, attribute-styled — unchanged emission path).
  • Deprecation aliases via resolveElevation() + ELEVATION_ALIAS: noneflat (keeps the surface, NOT flush), smraised, mdraised, lgfloating, each with a console.warn (the SPEC-086 alias pattern). Ladder values pass through.
  • frame-shadow untouched — the alias only rewrites the rune-surface elevation scale.

Notes

  • elevation.test.ts rewritten for the ladder: value passthrough, the per-rune default + author override, all four deprecated aliases + the explicit "none ≠ flush" guard. 10 tests green.