icon: curated inline-SVG set with select param #96

Closed
opened 2026-07-18 02:26:21 +02:00 by dominik.polakovics · 1 comment

What to build

Replace the icon element's neutral placeholder with a real, dependency-free icon set, and constrain icon.name to it.

Theme: ~16-24 stroke-style inline SVGs in a theme partial, tinted via currentColor, aria-hidden preserved. Proposed list (adjust for drawing quality, keep names kebab-case): arrow-right, arrow-left, arrow-up, arrow-down, chevron-right, chevron-down, mail, phone, download, external, check, close, info, warning, search, calendar, location, clock, user, globe, heart, star, menu, document.

Sidecar: icon.yaml's name param becomes type: select with options listing exactly the shipped names. Keep emitting ce-icon--<name> / data-icon so forks can restyle or extend; a fork adding icons extends both the partial and the sidecar options.

Existing content: any already-stored free-text name that matches a shipped name renders; a non-matching stored name must degrade gracefully (render nothing visible rather than a broken square) — note this in the sidecar comment.

Acceptance criteria

  • Theme partial ships the inline SVG set; no external assets, fonts, or JS
  • icon.name is a select over exactly the shipped names; picker shows the list
  • Icons render at text size, tinted by currentColor, aria-hidden="true"
  • Unknown stored name degrades gracefully at render time
  • ce-icon--<name> and data-icon output unchanged in shape for fork compatibility
  • Publish via real Hugo build with several icons inline in a text body

Blocked by

None - can start immediately

## What to build Replace the icon element's neutral placeholder with a real, dependency-free icon set, and constrain `icon.name` to it. Theme: ~16-24 stroke-style inline SVGs in a theme partial, tinted via `currentColor`, `aria-hidden` preserved. Proposed list (adjust for drawing quality, keep names kebab-case): arrow-right, arrow-left, arrow-up, arrow-down, chevron-right, chevron-down, mail, phone, download, external, check, close, info, warning, search, calendar, location, clock, user, globe, heart, star, menu, document. Sidecar: `icon.yaml`'s `name` param becomes `type: select` with `options` listing exactly the shipped names. Keep emitting `ce-icon--<name>` / `data-icon` so forks can restyle or extend; a fork adding icons extends both the partial and the sidecar options. Existing content: any already-stored free-text name that matches a shipped name renders; a non-matching stored name must degrade gracefully (render nothing visible rather than a broken square) — note this in the sidecar comment. ## Acceptance criteria - [ ] Theme partial ships the inline SVG set; no external assets, fonts, or JS - [ ] `icon.name` is a select over exactly the shipped names; picker shows the list - [ ] Icons render at text size, tinted by `currentColor`, `aria-hidden="true"` - [ ] Unknown stored name degrades gracefully at render time - [ ] `ce-icon--<name>` and `data-icon` output unchanged in shape for fork compatibility - [ ] Publish via real Hugo build with several icons inline in a text body ## Blocked by None - can start immediately
Author
Owner

This was generated by AI during triage.

Triage confirmed — enhancement, ready-for-agent. The issue body is the authoritative agent brief.

Verified against the codebase: icon.yaml currently has free-text name and its own comment documents the ce-icon--<name> / data-icon fork contract this issue preserves; the theme ships a neutral placeholder in icon.html. The graceful-degradation rule for stale stored names covers the only migration concern. Icon list is adjustable for drawing quality per the body.

> *This was generated by AI during triage.* **Triage confirmed — enhancement, ready-for-agent.** The issue body is the authoritative agent brief. Verified against the codebase: `icon.yaml` currently has free-text `name` and its own comment documents the `ce-icon--<name>` / `data-icon` fork contract this issue preserves; the theme ships a neutral placeholder in `icon.html`. The graceful-degradation rule for stale stored names covers the only migration concern. Icon list is adjustable for drawing quality per the body.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/deckle#96
No description provided.