Skip to content

Feature - Typography Mapper tool#721

Open
markmead wants to merge 16 commits into
mainfrom
feature/typography-mapper
Open

Feature - Typography Mapper tool#721
markmead wants to merge 16 commits into
mainfrom
feature/typography-mapper

Conversation

@markmead

Copy link
Copy Markdown
Owner

Summary

  • Adds the Typography Mapper tool at /tools/typography-mapper — enter font size, line height, and optional letter spacing from a design handoff to get the exact Tailwind CSS class or an arbitrary value fallback with a ready-to-paste @theme {} config block
  • Config section always shows after a result so users can generate named utilities from any value combination, exact tokens included
  • Copy button only appears when the config block has real content (hidden for the placeholder comment)
  • Nearest Tailwind Sizes section removed — redundant now that the config block always shows
  • Banner flash-of-unstyled-content fix on return visits to the homepage (inline head script + CSS attribute guard)
  • stable status colour changed to green to distinguish from updated (blue)
  • mb-4 removed from StatusBadge on tool pages to fix double-spacing against space-y-6

Test plan

  • Visit /tools/typography-mapper — enter values that map to exact tokens, confirm config shows with comment and no Copy button
  • Enter values that require arbitrary fallbacks, confirm Copy button appears and @theme {} block is populated
  • Enter a class name, confirm custom utility is generated regardless of exact/arbitrary
  • Visit homepage, dismiss the tools banner, reload — confirm banner does not flash before hiding
  • Check StatusBadge colours: stable = green, updated = blue, fresh = green

🤖 Generated with Claude Code

markmead and others added 14 commits June 13, 2026 16:43
Adds /tools/typography-mapper — a browser-based tool for mapping Figma
px values (font-size + line-height) to Tailwind CSS classes. Includes
live text preview, type scale visualisation, nearest Tailwind size cards,
ratio badge, and a Tailwind v4 @theme config block for arbitrary values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace text-gray-400/500 with text-gray-600 throughout (project rule)
- Add ARIA live regions to config and nearest card copy buttons
- Extract shared copyTextToClipboard helper, remove duplicated timer logic
- Fix buildThemeConfig to use pxToRem() and direct pixel ratio for line-height
- Simplify buildScaleTrackItems to use indexOf instead of findIndex
- Remove overflow-hidden wrapper from preview text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add CSS transitions using @starting-style for enter/exit animations on
the skeleton, result, config, and nearest containers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…page section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@markmead markmead added the enhancement New feature or request label Jun 18, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperui fbc4562 Commit Preview URL

Branch Preview URL
Jun 18 2026, 08:03 AM

markmead and others added 2 commits June 18, 2026 08:46
…/inline-flex conflict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…config deduplication

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant