WORK-419
ID:WORK-419Status:pending

icon: image-src resolver

The inline icon shorthand discussed when the icon rune landed: ![GitHub](icon:github) resolves to the named icon's inline SVG — the same source the {% icon %} rune uses.

Priority:mediumComplexity:moderateMilestone:v0.22.0Source:SPEC-106
claude/spec-image-src-scheme-sugar View source

Criteria completion

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

Tracking started Jun 13 — check back for trends.

Branches 2
claude/spec-image-src-scheme-sugar current pending
claude/spec-106-image-src-schemes donemain done
History 1
  1. 8bc0dca
    Created (pending)by bjornolofandersson

Scope

  • Register an icon:<name> resolver (via WORK-418) that looks the name up in the theme's global icon group and inlines its SVG, with alt as the accessible label (aria-label/role="img").
  • Unknown icon name → dev warning + graceful fallback (neutral glyph or passthrough), not a hard error.
  • Reuse the {% icon %} rune's resolution path rather than duplicating it.

Acceptance Criteria

  • ![label](icon:<name>) renders the icon set's SVG inline, with alt exposed as the accessible label.
  • An unknown icon name warns (dev) and falls back gracefully.
  • Resolution shares the {% icon %} rune's icon source; tests cover a known + unknown name.

Dependencies

  • Requires WORK-418 (the scheme registry).

References

  • SPEC-106 · {% icon %} rune (packages/runes/src/index.ts) + theme global icon group.