[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M757QX38T8YBRHH4RGFZP1Z7":3,"skill-same:01M757QX38T8YBRHH4RGFZP1Z7":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M757QX38T8YBRHH4RGFZP1Z7","iconography-and-imagery",null,"Reference-grade guide to building and shipping icon systems (grids, optical sizing, variable axes, SVG delivery) and imagery (aspect ratios, art direction, modern formats, performance) with copy-pasteable code, exact numbers, and cross-device rules.","jpoindexter\u002FVanta","jpoindexter","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2729617?v=4","01M72VRRYY1CP7RPF3B7GHH0CR","01M757GWDBT6RD147ZZ79N4MEX",4,"MIT","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fdesign-system-skills\u002Ficonography-and-imagery\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: iconography-and-imagery\ndescription: Reference-grade guide to building and shipping icon systems (grids, optical sizing, variable axes, SVG delivery) and imagery (aspect ratios, art direction, modern formats, performance) with copy-pasteable code, exact numbers, and cross-device rules.\ntags: [design-systems, icons, imagery, svg, illustration]\n---\n# Iconography & Imagery\n\nIcons and images carry most of a UI's pixels and most of its weight. Get the grid, the optics, and the delivery format right and everything reads sharper and loads faster. This is the working reference: build the icon set on a disciplined grid, ship it as inline SVG or a sprite, and serve images as AVIF\u002FWebP with a reserved aspect-ratio box.\n\n## 1. Icon grid & construction\n\nEvery icon lives on a square pixel grid. Standardize one base, scale by clean multiples.\n\n| Base grid | Used by | Live area (padding) | Stroke | Corner radius |\n|-----------|---------|---------------------|--------|---------------|\n| 16px | dense toolbars, inline text icons | 14px (1px) | 1.5px | 1px |\n| 20px | compact UI (tables, menus) | 18px (1px) | 1.5px | 1.5px |\n| **24px** | **default UI standard (Material)** | **20px (2px)** | **2px** | **2px** |\n| 40px | large touch targets, feature tiles | 34px (3px) | 2.5px | 3px |\n| 48px | hero \u002F marketing | 40px (4px) | 3px | 4px |\n\n**Keyline shapes** anchor optical consistency. In a 24px box the canonical keylines are: square 18×18, circle ⌀20, vertical rectangle 16×20, horizontal rectangle 20×16. Snap each glyph to the keyline that matches its dominant shape so a circle (◎) and a square (▣) feel the same visual weight even though their bounding boxes differ.\n\n```\n24px box, 2px padding → 20px live area\n┌────────────────────────┐  ← 24px artboard\n│  ┌──────────────────┐  │\n│  │   keyline 20×20  │  │  ← optical balance happens HERE\n│  │   ┌──────────┐   │  │\n│  │   │ glyph    │   │  │\n│  │   └──────────┘   │  │\n│  └──────────────────┘  │\n└────────────────────────┘\n```\n\n**Rules**\n- **Pixel-snap** all anchors to whole or half pixels at the base size. A 2px stroke centered on a whole-pixel coordinate renders crisp; a stroke on x=12.37 renders blurry. For odd stroke widths (1px) center on the *half*-pixel (x=12.5) so the stroke lands inside one pixel column; for even widths (2px) center on the whole pixel.\n- **Optical alignment over mathematical centering.** A triangle (play ▶) centered by its bounding box looks left-heavy — nudge it ~1px right toward its visual centroid. Asymmetric glyphs almost always need a manual optical nudge.\n- **Consistent corner radius** across the whole set. Don't mix 1px and 4px corners; pick one radius scaled per base size.\n- **Terminal & joint consistency**: choose round vs. butt line caps and round vs. miter joins once (`stroke-linecap`, `stroke-linejoin`) and apply set-wide. Mismatched caps read as two different designers.\n- **Optical sizing**: a stroke that reads as 2px at 24px becomes hairline at 16px and chunky at 48px. Maintain *apparent* weight by increasing relative stroke at small sizes and drawing dedicated small variants (don't just `transform: scale()` a 24px icon down to 16px — it goes muddy). Material ships 20\u002F24\u002F40\u002F48 masters for exactly this reason.\n\n## 2. Icon style systems\n\n| Style | When | Notes |\n|-------|------|-------|\n| **Outline (stroke)** | default \u002F idle states | lighter, modern, neutral; most flexible |\n| **Filled (solid)** | selected \u002F active \u002F emphasis | higher contrast, signals \"on\" |\n| **Duotone** | brand accent, illustrative chips | two opacities of one hue, or two tokens |\n| **Two-tone \u002F multicolor** | logos, status, rich UI | reserve for meaning, not decoration |\n\n**The selected-state convention:** outline = inactive, filled = active. A tab bar shows outline icons; the current tab fills. This is learned, universal, and keeps you from inventing a new affordance.\n\n**Material Symbols (variable font, 2024–2026)** exposes 4 axes — tune them with `font-variation-settings`, animate them with a transition:\n\n```css\n.material-symbols-outlined {\n  font-variation-settings:\n    'FILL' 0,    \u002F* 0 outline → 1 filled (animatable for select states) *\u002F\n    'wght' 400,  \u002F* 100–700 weight, match adjacent text weight *\u002F\n    'GRAD' 0,    \u002F* -25…200 emphasis; +50 on dark bg, -25 on light *\u002F\n    'opsz' 24;   \u002F* 20–48 OPTICAL SIZE — set to the rendered px size *\u002F\n  transition: font-variation-settings 200ms ease;\n}\n.nav-item[aria-current='page'] .material-symbols-outlined {\n  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;\n}\n```\n> Always set `opsz` to the actual render size — that is what optical sizing is for. GRAD is a finer dial than wght for dark-mode legibility.\n\n**SF Symbols (Apple platforms)** mirror SF font weights (`.ultraLight`…`.black`); pick the weight that matches the adjacent text. Rendering modes: **monochrome** (single tint), **hierarchical** (one hue, layered opacities), **palette** (you supply 2–3 colors), **multicolor** (built-in semantic colors, e.g. yellow warning). Align symbols to text via the SF baseline so glyph and label share a cap line.\n\n## 3. Icon usage\n\n- **Pair icons with labels.** Icon-only is only safe for the ~12 truly universal glyphs (search, close, menu, back, play). Everything else is a guessing game. Icon-only controls **must** carry an accessible name and ideally a tooltip:\n  ```html\n  \u003Cbutton aria-label=\"Delete file\">\n    \u003Csvg aria-hidden=\"true\" focusable=\"false\" width=\"20\" height=\"20\">…\u003C\u002Fsvg>\n  \u003C\u002Fbutton>\n  ```\n- **Size to cap-height, not line-height.** An inline icon next to 16px text should be ~16–20px (≈1em–1.25em) and vertically centered on the text's cap height. Match by eye — geometric icons often need to be slightly *larger* than the cap height to feel equal.\n- **Color with `currentColor`** so icons inherit text color and theme automatically (see §4).\n- **Touch target ≥ 44×44px (iOS) \u002F 48×48dp (Android)** regardless of the glyph size. A 20px icon still needs 44px of hittable padding.\n- **Avoid ambiguous metaphors**: a floppy disk for \"save\" survives only by convention; a heart vs. star vs. bookmark all mean \"save for later\" to different users — pick one and label it. Never overload one glyph with two meanings in the same product.\n- **Recognizability ladder**: ~12 glyphs are truly universal (search, close ✕, menu ☰, back ‹, home, settings ⚙, share, trash, play\u002Fpause, plus, check, chevron). One tier down (filter, sort, sync, attach) is *familiar but not certain* — keep a label. Anything domain-specific (a custom \"reconcile\" icon) is decorative until proven; it never flies solo.\n- **Direction & RTL**: mirror directional icons (back, next, list-indent, undo's curve) for right-to-left locales with `[dir=\"rtl\"] .icon{ transform:scaleX(-1) }`; never mirror clocks, logos, or media-progress glyphs.\n\n## 4. SVG delivery — the technical core\n\n| Method | Best for | Color | Caching | Verdict |\n|--------|----------|-------|---------|---------|\n| **Inline `\u003Csvg>`** | icons that change color\u002Fanimate, ≤~40 on a page | `currentColor`, per-instance CSS | none (in HTML) | best for interactivity |\n| **SVG sprite + `\u003Cuse>`** | large reusable sets | `currentColor` works | one cached file | best for scale |\n| **`\u003Cimg src=\".svg\">`** | decorative, static, isolated | locked at author time | own HTTP cache | simple, no CSS control |\n| **Icon font** | — | — | — | **avoid** (see below) |\n\n**Why not icon fonts:** glyphs render on the text baseline (vertical-align headaches), anti-aliasing differs from SVG, they fail as tofu boxes when the font load fails, screen readers may announce the private-use codepoint, and you can't do multicolor. SVG solved all of this. Migrate off icon fonts.\n\n**`currentColor` is the whole trick** — author the SVG with `fill=\"currentColor\"` (or `stroke`), then color it from CSS:\n```html\n\u003Csvg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-label=\"Settings\">\n  \u003Cpath d=\"M12 8a4 4 0 100 8 4 4 0 000-8z…\"\u002F>\n\u003C\u002Fsvg>\n```\n```css\n.icon-btn { color: var(--fg-muted); }\n.icon-btn:hover { color: var(--fg-strong); }   \u002F* icon follows for free *\u002F\n```\n\n**Sprite pattern** (build once, reference everywhere):\n```html\n\u003C!-- once, near \u003Cbody> top, or fetched & injected -->\n\u003Csvg style=\"display:none\" aria-hidden=\"true\">\n  \u003Csymbol id=\"i-search\" viewBox=\"0 0 24 24\">\u003Cpath d=\"…\"\u002F>\u003C\u002Fsymbol>\n  \u003Csymbol id=\"i-close\"  viewBox=\"0 0 24 24\">\u003Cpath d=\"…\"\u002F>\u003C\u002Fsymbol>\n\u003C\u002Fsvg>\n\u003C!-- anywhere -->\n\u003Csvg class=\"icon\" width=\"20\" height=\"20\" aria-hidden=\"true\">\u003Cuse href=\"#i-search\"\u002F>\u003C\u002Fsvg>\n```\n\n**Accessibility decision tree**\n- Decorative (label is adjacent): `aria-hidden=\"true\"` + `focusable=\"false\"`.\n- Standalone meaning: `role=\"img\"` + `aria-label=\"…\"`, or a `\u003Ctitle>` as the first child (`\u003Csvg>\u003Ctitle>Search\u003C\u002Ftitle>…`).\n- Always add `focusable=\"false\"` — IE\u002Flegacy Edge tab-stops into SVGs otherwise.\n\n**Optimize with SVGO** — strips editor cruft, collapses transforms, rounds coordinates. Typical 40–70% size cut. Keep `viewBox`, drop hardcoded `width`\u002F`height` so CSS controls size. Don't let SVGO merge paths you need to animate separately.\n```bash\nnpx svgo --multipass -f .\u002Ficons -o .\u002Ficons-min\n```\n\n**Animate** stroke draw-on, fill toggles, or rotation cheaply with CSS\u002FSMIL; respect `prefers-reduced-motion`:\n```css\n@media (prefers-reduced-motion: reduce){ .icon-spin{ animation:none } }\n```\n\n## 5. Imagery — aspect ratios & art direction\n\n| Ratio | Decimal | Use |\n|-------|---------|-----|\n| 1:1 | 1.00 | avatars, product thumbs, social grid |\n| 4:3 | 1.33 | classic photo, content cards |\n| 3:2 | 1.50 | DSLR photography, editorial |\n| 16:9 | 1.78 | video, hero, OG images |\n| 21:9 | 2.33 | cinematic banners |\n| 1.618:1 | golden | balanced editorial crops |\n\n**Reserve the box to kill CLS.** Set `aspect-ratio` (or width\u002Fheight attrs) so the browser lays out the slot before the image arrives — no content jump:\n```css\n.media { aspect-ratio: 16 \u002F 9; width: 100%; }\n.media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }\n```\n`object-position` lets you bias the crop toward the focal point (faces sit high → favor the top third).\n\n**Art direction = different crops per breakpoint**, not just different sizes. Use `\u003Cpicture>`:\n```html\n\u003Cpicture>\n  \u003Csource media=\"(min-width:1024px)\" srcset=\"hero-wide.avif\" type=\"image\u002Favif\">\n  \u003Csource media=\"(min-width:1024px)\" srcset=\"hero-wide.webp\" type=\"image\u002Fwebp\">\n  \u003Csource srcset=\"hero-tall.avif\" type=\"image\u002Favif\">\n  \u003Cimg src=\"hero-tall.jpg\" alt=\"Team on stage\" width=\"800\" height=\"1000\" loading=\"eager\" fetchpriority=\"high\">\n\u003C\u002Fpicture>\n```\n\n**Resolution switching** (same crop, right pixels) = `srcset`\u002F`sizes`:\n```html\n\u003Cimg src=\"card-800.jpg\"\n     srcset=\"card-400.jpg 400w, card-800.jpg 800w, card-1200.jpg 1200w, card-2400.jpg 2400w\"\n     sizes=\"(min-width:768px) 33vw, 100vw\"\n     alt=\"Trail map\" width=\"800\" height=\"600\" loading=\"lazy\" decoding=\"async\">\n```\nThe `2400w` source covers @2x\u002F@3x retina; the browser picks by DPR automatically. **Author `sizes` honestly** — a wrong `sizes` makes the browser download the wrong file.\n\n## 6. Image formats — pick by content\n\n| Format | Use when | Wins | Watch |\n|--------|----------|------|-------|\n| **AVIF** | photos, gradients (primary 2024+) | smallest (~50% \u003C JPEG), HDR, alpha | slower encode; provide WebP fallback |\n| **WebP** | universal fallback for AVIF | ~30% \u003C JPEG, alpha, wide support | — |\n| **JPEG** | last-resort photo fallback | universal | no alpha; q≈75–82 sweet spot |\n| **PNG** | hard-edge UI, transparency, screenshots | lossless, alpha | huge for photos — never for photos |\n| **SVG** | logos, icons, flat illustration | infinite scale, tiny, themeable | not for photographic content |\n\n**Order in `\u003Cpicture>`: AVIF → WebP → JPEG.** First supported wins. Compress to perceptual target, not a blanket quality number — flat graphics tolerate q60, faces need q80+. Strip EXIF\u002Fmetadata in the build.\n\n**Rough quality + budget targets** (per image, gzip not applicable — already compressed):\n\n| Asset | Format | Quality | Byte budget |\n|-------|--------|---------|-------------|\n| Hero \u002F LCP | AVIF | ~50–60 | ≤ 150–200 KB |\n| Content photo | AVIF\u002FWebP | ~55–65 | ≤ 80 KB |\n| Card thumb | AVIF\u002FWebP | ~50 | ≤ 25 KB |\n| Avatar 1:1 | WebP | ~70 | ≤ 10 KB |\n| Flat illustration | SVG (SVGO) | — | ≤ 15 KB |\n| UI icon | inline\u002Fsprite SVG | — | ≤ 1–2 KB each |\n\nMeasure on real content; faces and text-in-image need the high end, gradients and skies the low end.\n\n**Lazy-load + LQIP\u002Fblur-up.** `loading=\"lazy\"` for below-the-fold; `eager` + `fetchpriority=\"high\"` for the LCP hero (the one image you must NOT lazy-load). Blur-up = inline a tiny (~20px wide) base64 placeholder, swap on load:\n```css\n.blur-up{ filter:blur(12px); transition:filter .3s }\n.blur-up.loaded{ filter:none }\n```\nLQIP variants, smallest to richest: solid dominant-color fill → a ~20px blurred base64 → BlurHash\u002FThumbHash (≈20–30 char string decoded to a gradient placeholder). All three need the box already reserved by `aspect-ratio` so the swap doesn't shift layout.\n\n**Retina math.** A slot rendered at 400 CSS px needs 800 device px at @2x and 1200 at @3x. Provide those in `srcset` (`400w\u002F800w\u002F1200w`) and let DPR selection do the work — never hardcode @2x in `src`, and don't ship a 2400px file into a 400px slot \"to be safe\" (it wastes bytes and decode time). Cap meaningful density at ~2x for photos; @3x gains are mostly imperceptible and triple the payload.\n\n## 7. Illustration & brand imagery\n\n- **One style system**: fixed stroke width, shared corner radius, consistent perspective (flat vs. isometric — don't mix), and a **palette pulled from design tokens**, not ad-hoc hex. Illustrations should re-theme with the brand.\n- **Grid-built** like icons so a set feels coherent at a glance.\n- **Empty states \u002F onboarding**: one focused illustration + one line of copy + one action. Skip elaborate scenes that slow the page.\n- **Performance**: export illustration as optimized SVG when flat; rasterize complex gradient\u002Ftexture art to AVIF — a \"lightweight\" SVG with 4,000 nodes is heavier and jankier than a 30KB AVIF.\n\n## 8. Photography, scrims & dark mode\n\n- **Text on photos always needs a scrim** for contrast — a gradient\u002Foverlay guaranteeing ≥4.5:1 (AA) for body, ≥3:1 for large text:\n  ```css\n  .hero-overlay{ background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 100%) }\n  ```\n  Prefer a directional gradient over a flat dark wash so the image still breathes. Never place text on a busy region without a scrim — verify contrast on the *actual* pixels behind the text.\n- **Photography guidelines**: consistent color grade\u002Ftemperature across a set, single focal subject, generous negative space where text will land, authentic over stock-cliché.\n- **Dark mode**: don't invert photos. Dim them (`filter: brightness(.85)`), swap to a dark-shot `\u003Csource>` via `prefers-color-scheme`, or soften pure-white logos to ~90% to cut halation. Provide dark variants of brand illustrations rather than CSS-inverting them.\n\n## Common mistakes\n\n| Don't | Do |\n|-------|-----|\n| Mix outline + filled + duotone in one cluster | One style per context; filled only for active |\n| Mix stroke weights (1px here, 2.5px there) | One stroke per base size across the set |\n| Ship icon-only buttons with no name | `aria-label` + tooltip on every icon-only control |\n| Draw icons off the pixel grid | Snap anchors; align to keyline shapes |\n| `scale()` a 24px icon down to 16px | Draw a dedicated small variant \u002F use `opsz` |\n| Use an icon font | Inline SVG or sprite with `currentColor` |\n| Ship raw exported SVGs | SVGO multipass, keep `viewBox`, drop width\u002Fheight |\n| Omit width\u002Fheight\u002F`aspect-ratio` on `\u003Cimg>` | Reserve the box → zero CLS |\n| Serve JPEG\u002FPNG everywhere | AVIF → WebP → JPEG in `\u003Cpicture>` |\n| Lazy-load the LCP hero | `eager` + `fetchpriority=\"high\"` on the hero only |\n| One image for all viewports | `\u003Cpicture>` art direction + `srcset`\u002F`sizes` |\n| Text on a busy photo, no scrim | Gradient scrim guaranteeing ≥4.5:1 |\n| Inconsistent crops across a card grid | One ratio + `object-fit:cover` + focal `object-position` |\n| Invert photos for dark mode | Dim, swap source, or soften logos |\n","# Iconography & Imagery\n\nIcons and images carry most of a UI's pixels and most of its weight. Get the grid, the optics, and the delivery format right and everything reads sharper and loads faster. This is the working reference: build the icon set on a disciplined grid, ship it as inline SVG or a sprite, and serve images as AVIF\u002FWebP with a reserved aspect-ratio box.\n\n## 1. Icon grid & construction\n\nEvery icon lives on a square pixel grid. Standardize one base, scale by clean multiples.\n\n| Base grid | Used by | Live area (padding) | Stroke | Corner radius |\n|-----------|---------|---------------------|--------|---------------|\n| 16px | dense toolbars, inline text icons | 14px (1px) | 1.5px | 1px |\n| 20px | compact UI (tables, menus) | 18px (1px) | 1.5px | 1.5px |\n| **24px** | **default UI standard (Material)** | **20px (2px)** | **2px** | **2px** |\n| 40px | large touch targets, feature tiles | 34px (3px) | 2.5px | 3px |\n| 48px | hero \u002F marketing | 40px (4px) | 3px | 4px |\n\n**Keyline shapes** anchor optical consistency. In a 24px box the canonical keylines are: square 18×18, circle ⌀20, vertical rectangle 16×20, horizontal rectangle 20×16. Snap each glyph to the keyline that matches its dominant shape so a circle (◎) and a square (▣) feel the same visual weight even though their bounding boxes differ.\n\n```\n24px box, 2px padding → 20px live area\n┌────────────────────────┐  ← 24px artboard\n│  ┌──────────────────┐  │\n│  │   keyline 20×20  │  │  ← optical balance happens HERE\n│  │   ┌──────────┐   │  │\n│  │   │ glyph    │   │  │\n│  │   └──────────┘   │  │\n│  └──────────────────┘  │\n└────────────────────────┘\n```\n\n**Rules**\n- **Pixel-snap** all anchors to whole or half pixels at the base size. A 2px stroke centered on a whole-pixel coordinate renders crisp; a stroke on x=12.37 renders blurry. For odd stroke widths (1px) center on the *half*-pixel (x=12.5) so the stroke lands inside one pixel column; for even widths (2px) center on the whole pixel.\n- **Optical alignment over mathematical centering.** A triangle (play ▶) centered by its bounding box looks left-heavy — nudge it ~1px right toward its visual centroid. Asymmetric glyphs almost always need a manual optical nudge.\n- **Consistent corner radius** across the whole set. Don't mix 1px and 4px corners; pick one radius scaled per base size.\n- **Terminal & joint consistency**: choose round vs. butt line caps and round vs. miter joins once (`stroke-linecap`, `stroke-linejoin`) and apply set-wide. Mismatched caps read as two different designers.\n- **Optical sizing**: a stroke that reads as 2px at 24px becomes hairline at 16px and chunky at 48px. Maintain *apparent* weight by increasing relative stroke at small sizes and drawing dedicated small variants (don't just `transform: scale()` a 24px icon down to 16px — it goes muddy). Material ships 20\u002F24\u002F40\u002F48 masters for exactly this reason.\n\n## 2. Icon style systems\n\n| Style | When | Notes |\n|-------|------|-------|\n| **Outline (stroke)** | default \u002F idle states | lighter, modern, neutral; most flexible |\n| **Filled (solid)** | selected \u002F active \u002F emphasis | higher contrast, signals \"on\" |\n| **Duotone** | brand accent, illustrative chips | two opacities of one hue, or two tokens |\n| **Two-tone \u002F multicolor** | logos, status, rich UI | reserve for meaning, not decoration |\n\n**The selected-state convention:** outline = inactive, filled = active. A tab bar shows outline icons; the current tab fills. This is learned, universal, and keeps you from inventing a new affordance.\n\n**Material Symbols (variable font, 2024–2026)** exposes 4 axes — tune them with `font-variation-settings`, animate them with a transition:\n\n```css\n.material-symbols-outlined {\n  font-variation-settings:\n    'FILL' 0,    \u002F* 0 outline → 1 filled (animatable for select states) *\u002F\n    'wght' 400,  \u002F* 100–700 weight, match adjacent text weight *\u002F\n    'GRAD' 0,    \u002F* -25…200 emphasis; +50 on dark bg, -25 on light *\u002F\n    'opsz' 24;   \u002F* 20–48 OPTICAL SIZE — set to the rendered px size *\u002F\n  transition: font-variation-settings 200ms ease;\n}\n.nav-item[aria-current='page'] .material-symbols-outlined {\n  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;\n}\n```\n> Always set `opsz` to the actual render size — that is what optical sizing is for. GRAD is a finer dial than wght for dark-mode legibility.\n\n**SF Symbols (Apple platforms)** mirror SF font weights (`.ultraLight`…`.black`); pick the weight that matches the adjacent text. Rendering modes: **monochrome** (single tint), **hierarchical** (one hue, layered opacities), **palette** (you supply 2–3 colors), **multicolor** (built-in semantic colors, e.g. yellow warning). Align symbols to text via the SF baseline so glyph and label share a cap line.\n\n## 3. Icon usage\n\n- **Pair icons with labels.** Icon-only is only safe for the ~12 truly universal glyphs (search, close, menu, back, play). Everything else is a guessing game. Icon-only controls **must** carry an accessible name and ideally a tooltip:\n  ```html\n  \u003Cbutton aria-label=\"Delete file\">\n    \u003Csvg aria-hidden=\"true\" focusable=\"false\" width=\"20\" height=\"20\">…\u003C\u002Fsvg>\n  \u003C\u002Fbutton>\n  ```\n- **Size to cap-height, not line-height.** An inline icon next to 16px text should be ~16–20px (≈1em–1.25em) and vertically centered on the text's cap height. Match by eye — geometric icons often need to be slightly *larger* than the cap height to feel equal.\n- **Color with `currentColor`** so icons inherit text color and theme automatically (see §4).\n- **Touch target ≥ 44×44px (iOS) \u002F 48×48dp (Android)** regardless of the glyph size. A 20px icon still needs 44px of hittable padding.\n- **Avoid ambiguous metaphors**: a floppy disk for \"save\" survives only by convention; a heart vs. star vs. bookmark all mean \"save for later\" to different users — pick one and label it. Never overload one glyph with two meanings in the same product.\n- **Recognizability ladder**: ~12 glyphs are truly universal (search, close ✕, menu ☰, back ‹, home, settings ⚙, share, trash, play\u002Fpause, plus, check, chevron). One tier down (filter, sort, sync, attach) is *familiar but not certain* — keep a label. Anything domain-specific (a custom \"reconcile\" icon) is decorative until proven; it never flies solo.\n- **Direction & RTL**: mirror directional icons (back, next, list-indent, undo's curve) for right-to-left locales with `[dir=\"rtl\"] .icon{ transform:scaleX(-1) }`; never mirror clocks, logos, or media-progress glyphs.\n\n## 4. SVG delivery — the technical core\n\n| Method | Best for | Color | Caching | Verdict |\n|--------|----------|-------|---------|---------|\n| **Inline `\u003Csvg>`** | icons that change color\u002Fanimate, ≤~40 on a page | `currentColor`, per-instance CSS | none (in HTML) | best for interactivity |\n| **SVG sprite + `\u003Cuse>`** | large reusable sets | `currentColor` works | one cached file | best for scale |\n| **`\u003Cimg src=\".svg\">`** | decorative, static, isolated | locked at author time | own HTTP cache | simple, no CSS control |\n| **Icon font** | — | — | — | **avoid** (see below) |\n\n**Why not icon fonts:** glyphs render on the text baseline (vertical-align headaches), anti-aliasing differs from SVG, they fail as tofu boxes when the font load fails, screen readers may announce the private-use codepoint, and you can't do multicolor. SVG solved all of this. Migrate off icon fonts.\n\n**`currentColor` is the whole trick** — author the SVG with `fill=\"currentColor\"` (or `stroke`), then color it from CSS:\n```html\n\u003Csvg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-label=\"Settings\">\n  \u003Cpath d=\"M12 8a4 4 0 100 8 4 4 0 000-8z…\"\u002F>\n\u003C\u002Fsvg>\n```\n```css\n.icon-btn { color: var(--fg-muted); }\n.icon-btn:hover { color: var(--fg-strong); }   \u002F* icon follows for free *\u002F\n```\n\n**Sprite pattern** (build once, reference everywhere):\n```html\n\u003C!-- once, near \u003Cbody> top, or fetched & injected -->\n\u003Csvg style=\"display:none\" aria-hidden=\"true\">\n  \u003Csymbol id=\"i-search\" viewBox=\"0 0 24 24\">\u003Cpath d=\"…\"\u002F>\u003C\u002Fsymbol>\n  \u003Csymbol id=\"i-close\"  viewBox=\"0 0 24 24\">\u003Cpath d=\"…\"\u002F>\u003C\u002Fsymbol>\n\u003C\u002Fsvg>\n\u003C!-- anywhere -->\n\u003Csvg class=\"icon\" width=\"20\" height=\"20\" aria-hidden=\"true\">\u003Cuse href=\"#i-search\"\u002F>\u003C\u002Fsvg>\n```\n\n**Accessibility decision tree**\n- Decorative (label is adjacent): `aria-hidden=\"true\"` + `focusable=\"false\"`.\n- Standalone meaning: `role=\"img\"` + `aria-label=\"…\"`, or a `\u003Ctitle>` as the first child (`\u003Csvg>\u003Ctitle>Search\u003C\u002Ftitle>…`).\n- Always add `focusable=\"false\"` — IE\u002Flegacy Edge tab-stops into SVGs otherwise.\n\n**Optimize with SVGO** — strips editor cruft, collapses transforms, rounds coordinates. Typical 40–70% size cut. Keep `viewBox`, drop hardcoded `width`\u002F`height` so CSS controls size. Don't let SVGO merge paths you need to animate separately.\n```bash\nnpx svgo --multipass -f .\u002Ficons -o .\u002Ficons-min\n```\n\n**Animate** stroke draw-on, fill toggles, or rotation cheaply with CSS\u002FSMIL; respect `prefers-reduced-motion`:\n```css\n@media (prefers-reduced-motion: reduce){ .icon-spin{ animation:none } }\n```\n\n## 5. Imagery — aspect ratios & art direction\n\n| Ratio | Decimal | Use |\n|-------|---------|-----|\n| 1:1 | 1.00 | avatars, product thumbs, social grid |\n| 4:3 | 1.33 | classic photo, content cards |\n| 3:2 | 1.50 | DSLR photography, editorial |\n| 16:9 | 1.78 | video, hero, OG images |\n| 21:9 | 2.33 | cinematic banners |\n| 1.618:1 | golden | balanced editorial crops |\n\n**Reserve the box to kill CLS.** Set `aspect-ratio` (or width\u002Fheight attrs) so the browser lays out the slot before the image arrives — no content jump:\n```css\n.media { aspect-ratio: 16 \u002F 9; width: 100%; }\n.media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }\n```\n`object-position` lets you bias the crop toward the focal point (faces sit high → favor the top third).\n\n**Art direction = different crops per breakpoint**, not just different sizes. Use `\u003Cpicture>`:\n```html\n\u003Cpicture>\n  \u003Csource media=\"(min-width:1024px)\" srcset=\"hero-wide.avif\" type=\"image\u002Favif\">\n  \u003Csource media=\"(min-width:1024px)\" srcset=\"hero-wide.webp\" type=\"image\u002Fwebp\">\n  \u003Csource srcset=\"hero-tall.avif\" type=\"image\u002Favif\">\n  \u003Cimg src=\"hero-tall.jpg\" alt=\"Team on stage\" width=\"800\" height=\"1000\" loading=\"eager\" fetchpriority=\"high\">\n\u003C\u002Fpicture>\n```\n\n**Resolution switching** (same crop, right pixels) = `srcset`\u002F`sizes`:\n```html\n\u003Cimg src=\"card-800.jpg\"\n     srcset=\"card-400.jpg 400w, card-800.jpg 800w, card-1200.jpg 1200w, card-2400.jpg 2400w\"\n     sizes=\"(min-width:768px) 33vw, 100vw\"\n     alt=\"Trail map\" width=\"800\" height=\"600\" loading=\"lazy\" decoding=\"async\">\n```\nThe `2400w` source covers @2x\u002F@3x retina; the browser picks by DPR automatically. **Author `sizes` honestly** — a wrong `sizes` makes the browser download the wrong file.\n\n## 6. Image formats — pick by content\n\n| Format | Use when | Wins | Watch |\n|--------|----------|------|-------|\n| **AVIF** | photos, gradients (primary 2024+) | smallest (~50% \u003C JPEG), HDR, alpha | slower encode; provide WebP fallback |\n| **WebP** | universal fallback for AVIF | ~30% \u003C JPEG, alpha, wide support | — |\n| **JPEG** | last-resort photo fallback | universal | no alpha; q≈75–82 sweet spot |\n| **PNG** | hard-edge UI, transparency, screenshots | lossless, alpha | huge for photos — never for photos |\n| **SVG** | logos, icons, flat illustration | infinite scale, tiny, themeable | not for photographic content |\n\n**Order in `\u003Cpicture>`: AVIF → WebP → JPEG.** First supported wins. Compress to perceptual target, not a blanket quality number — flat graphics tolerate q60, faces need q80+. Strip EXIF\u002Fmetadata in the build.\n\n**Rough quality + budget targets** (per image, gzip not applicable — already compressed):\n\n| Asset | Format | Quality | Byte budget |\n|-------|--------|---------|-------------|\n| Hero \u002F LCP | AVIF | ~50–60 | ≤ 150–200 KB |\n| Content photo | AVIF\u002FWebP | ~55–65 | ≤ 80 KB |\n| Card thumb | AVIF\u002FWebP | ~50 | ≤ 25 KB |\n| Avatar 1:1 | WebP | ~70 | ≤ 10 KB |\n| Flat illustration | SVG (SVGO) | — | ≤ 15 KB |\n| UI icon | inline\u002Fsprite SVG | — | ≤ 1–2 KB each |\n\nMeasure on real content; faces and text-in-image need the high end, gradients and skies the low end.\n\n**Lazy-load + LQIP\u002Fblur-up.** `loading=\"lazy\"` for below-the-fold; `eager` + `fetchpriority=\"high\"` for the LCP hero (the one image you must NOT lazy-load). Blur-up = inline a tiny (~20px wide) base64 placeholder, swap on load:\n```css\n.blur-up{ filter:blur(12px); transition:filter .3s }\n.blur-up.loaded{ filter:none }\n```\nLQIP variants, smallest to richest: solid dominant-color fill → a ~20px blurred base64 → BlurHash\u002FThumbHash (≈20–30 char string decoded to a gradient placeholder). All three need the box already reserved by `aspect-ratio` so the swap doesn't shift layout.\n\n**Retina math.** A slot rendered at 400 CSS px needs 800 device px at @2x and 1200 at @3x. Provide those in `srcset` (`400w\u002F800w\u002F1200w`) and let DPR selection do the work — never hardcode @2x in `src`, and don't ship a 2400px file into a 400px slot \"to be safe\" (it wastes bytes and decode time). Cap meaningful density at ~2x for photos; @3x gains are mostly imperceptible and triple the payload.\n\n## 7. Illustration & brand imagery\n\n- **One style system**: fixed stroke width, shared corner radius, consistent perspective (flat vs. isometric — don't mix), and a **palette pulled from design tokens**, not ad-hoc hex. Illustrations should re-theme with the brand.\n- **Grid-built** like icons so a set feels coherent at a glance.\n- **Empty states \u002F onboarding**: one focused illustration + one line of copy + one action. Skip elaborate scenes that slow the page.\n- **Performance**: export illustration as optimized SVG when flat; rasterize complex gradient\u002Ftexture art to AVIF — a \"lightweight\" SVG with 4,000 nodes is heavier and jankier than a 30KB AVIF.\n\n## 8. Photography, scrims & dark mode\n\n- **Text on photos always needs a scrim** for contrast — a gradient\u002Foverlay guaranteeing ≥4.5:1 (AA) for body, ≥3:1 for large text:\n  ```css\n  .hero-overlay{ background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 100%) }\n  ```\n  Prefer a directional gradient over a flat dark wash so the image still breathes. Never place text on a busy region without a scrim — verify contrast on the *actual* pixels behind the text.\n- **Photography guidelines**: consistent color grade\u002Ftemperature across a set, single focal subject, generous negative space where text will land, authentic over stock-cliché.\n- **Dark mode**: don't invert photos. Dim them (`filter: brightness(.85)`), swap to a dark-shot `\u003Csource>` via `prefers-color-scheme`, or soften pure-white logos to ~90% to cut halation. Provide dark variants of brand illustrations rather than CSS-inverting them.\n\n## Common mistakes\n\n| Don't | Do |\n|-------|-----|\n| Mix outline + filled + duotone in one cluster | One style per context; filled only for active |\n| Mix stroke weights (1px here, 2.5px there) | One stroke per base size across the set |\n| Ship icon-only buttons with no name | `aria-label` + tooltip on every icon-only control |\n| Draw icons off the pixel grid | Snap anchors; align to keyline shapes |\n| `scale()` a 24px icon down to 16px | Draw a dedicated small variant \u002F use `opsz` |\n| Use an icon font | Inline SVG or sprite with `currentColor` |\n| Ship raw exported SVGs | SVGO multipass, keep `viewBox`, drop width\u002Fheight |\n| Omit width\u002Fheight\u002F`aspect-ratio` on `\u003Cimg>` | Reserve the box → zero CLS |\n| Serve JPEG\u002FPNG everywhere | AVIF → WebP → JPEG in `\u003Cpicture>` |\n| Lazy-load the LCP hero | `eager` + `fetchpriority=\"high\"` on the hero only |\n| One image for all viewports | `\u003Cpicture>` art direction + `srcset`\u002F`sizes` |\n| Text on a busy photo, no scrim | Gradient scrim guaranteeing ≥4.5:1 |\n| Inconsistent crops across a card grid | One ratio + `object-fit:cover` + focal `object-position` |\n| Invert photos for dark mode | Dim, swap source, or soften logos |\n",{"name":5,"tags":23,"description":7},[24,25,26,27,28],"design-systems","icons","imagery","svg","illustration","main","4911ae44bbb35beef4511ba298475ba5a82b7e1c","design-system-skills\u002Ficonography-and-imagery",0,"https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta","https:\u002F\u002Fdocs.vanta.theft.studio","https:\u002F\u002Fgithub.com\u002Fjpoindexter","jason.theft.studio","Just some guy trying to build stuff","2026-11-12 17:11:35",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add jpoindexter\u002FVanta --skill iconography-and-imagery",{"tool":45,"command":46},"bunx","bunx skills add jpoindexter\u002FVanta --skill iconography-and-imagery",{"tool":48,"command":49},"pnpm","pnpm dlx skills add jpoindexter\u002FVanta --skill iconography-and-imagery","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fdesign-system-skills\u002Ficonography-and-imagery\u002FSKILL.md",true,[],[54,61,68,75,82,88],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7582PEM7XM8B98VFRDV0C0J","write-changelog","Turn a range of commits into a user-facing changelog","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fsrc\u002Fmigrate\u002F__fixtures__\u002Fopenclaw\u002Fskills\u002Fwrite-changelog\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7582KTQJMP5Y7GS83MS1C7Z","debug-flaky-test","Reproduce and isolate a flaky test before fixing it","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fsrc\u002Fmigrate\u002F__fixtures__\u002Fopenclaw\u002Fskills\u002Fdebug-flaky-test\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7582HG7XFM4Z5NGG1YFECT8","triage-incident","First 10 minutes of an incident — stabilize, then diagnose","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fsrc\u002Fmigrate\u002F__fixtures__\u002Fhermes\u002Fskills\u002Ftriage-incident\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7582DQABK7A96XHMB770KQZ","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fskills-library\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7582BBK8H0HGSXKK08FCXJ1","vanta-port-adapter","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fskills-library\u002Fvanta-port-adapter\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M75828P8PX5XSBMJ2BVVDA9Y","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fjpoindexter\u002FVanta\u002Fblob\u002Fmain\u002Fvanta-ts\u002Fskills-library\u002Ftest-driven-development\u002FSKILL.md",[],[]]