WORK-362
Setting up your dashboard 0 entities found · 8/31 branches scanned
ID:WORK-362Status:done

Universal elevation attribute backed by a --rf-shadow-* token scale

Add a universal elevation attribute backed by a shared --rf-shadow-* token scale and migrate bespoke per-rune shadows onto it.

Priority:highComplexity:moderateMilestone:v0.20.0Source:SPEC-086

Criteria completion

Criteria completion: 3 of 3 (100%) checked; history from Jun 9 to Jun 90%25%50%75%100%Jun 9Jun 9
Branches 2
History 4
  1. da3c4de
    • ☑ `elevation` is a universal attribute (`none|sm|md|lg`) on block runes (joins `UNIVERSAL_ATTRIBUTE_NAMES`); engine sets `data-elevation`, CSS maps to `box-shadow: var(--rf-shadow-{level})`.
    • ☑ A `--rf-shadow-none|sm|md|lg` token scale exists; `figure`/`codegroup`/`card` reference it instead of bespoke shadow values.
    • ☑ `elevation` always renders as `box-shadow` (never `drop-shadow`).
    by bjornolofandersson
  2. 998faad
    Content editedby Claude
    plan: WORK-362 done (elevation); 363/364/365 in-progress
  3. 9c0545a
    Created (ready)by bjornolofandersson
  4. 1da59d6
    Content editedby Claude
    plan: add v0.20.0 milestone and break down SPEC-086..091 into work items

Acceptance Criteria

  • elevation is a universal attribute (none|sm|md|lg) on block runes (joins UNIVERSAL_ATTRIBUTE_NAMES); engine sets data-elevation, CSS maps to box-shadow: var(--rf-shadow-{level}).
  • A --rf-shadow-none|sm|md|lg token scale exists; figure/codegroup/card reference it instead of bespoke shadow values.
  • elevation always renders as box-shadow (never drop-shadow).

Approach

packages/runes/src/attribute-presets.ts (UNIVERSAL_ATTRIBUTE_NAMES); tokens in packages/lumina/tokens/base.css. SPEC-086 §1.

References

  • SPEC-086

Resolution

Completed: 2026-06-09

Branch: claude/spec-086-surface-chrome

What was done

  • Added elevation (none|sm|md|lg) to the universal attribute set (packages/runes/src/lib/index.ts schema + root forwarding; attribute-presets.ts name set).
  • Engine emits data-elevation on the root (no BEM class) — packages/transform/src/engine.ts.
  • Added --rf-shadow-none to the token scale (base.css) and the SPEC-053 token contract + luminaTokens; sm/md/lg already existed.
  • packages/lumina/styles/base/attributes.css maps [data-rune][data-elevation]box-shadow: var(--rf-shadow-*). codegroup already references the scale; figure/card have no bespoke shadow.

Notes

  • elevation="none" is emitted so an author can explicitly flatten a default shadow.
  • Tests: packages/transform/test/elevation.test.ts; updated the reference universal-attrs assertion.