@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -1,45 +1,113 @@
1
1
  # Email client quirks
2
2
 
3
- Treat this as verification guidance, not immutable truth. Client behavior changes; recheck current support matrices before release.
3
+ Treat this as verification guidance, not immutable truth. Client engines evolve—recheck current support on Can I email (`caniemail.com`) and real client previews before release.
4
4
 
5
- ## Outlook (Windows/Word rendering)
5
+ ## Outlook: New Outlook vs Classic Outlook
6
6
 
7
- - Expect weak support for modern CSS, margin/precision layout, border radius/background images/flex/grid.
8
- - Use table alignment, inline styles, explicit dimensions, MSO conditional comments only where justified.
9
- - Buttons need bulletproof/fallback structure or robust table cells; decorative rounding is optional, meaning is not.
10
- - Test dark mode/high contrast separately; color inversion can break imagery/logos.
7
+ Never treat "Outlook on Windows" as a single engine. During the 2026–2029 enterprise sunset transition, corporate inboxes split across two incompatible renderers:
11
8
 
12
- ## Gmail / Google clients
13
-
14
- - Watch total HTML size because long messages may clip; keep source/content focused.
15
- - Style stripping/embedded CSS support varies by client/surface; inline critical CSS.
16
- - Image blocking/proxying affects dimensions/alt visibility/tracking.
17
- - Promotions/threading/conversation grouping affect perceived order; subject/preheader/first visible copy matter.
18
-
19
- ## Apple Mail / iOS Mail
20
-
21
- - Often supports more modern behavior but still test dark mode, remote content privacy, text scaling, notched/small screens, and image failure.
22
- - Do not treat Apple-only rendering as proof because market/client mix differs.
23
-
24
- ## Dark mode
9
+ | Client | Rendering engine | `<!--[if mso]>` & VML | Practical rule |
10
+ |---|---|---|---|
11
+ | **New Outlook for Windows** | WebView2 / Chromium (shares core with Outlook on the web) | **ignored** (comments stripped/skipped, VML does not render) | modern CSS mostly works, distinct dark-mode rewrites (`[data-ogsc]`/`[data-ogsb]`); never rely on VML-only buttons or backgrounds |
12
+ | **Classic Outlook for Windows** | Microsoft Word HTML engine (enterprise sunset 2026–2029) | **executed** | weak flex/grid/margin/`border-radius`/CSS-background support; requires table cells, explicit widths, inline CSS, and narrowly scoped MSO/VML fallbacks |
25
13
 
26
- There is no single dark mode. Clients may invert colors partially, force backgrounds, leave images unchanged, or honor media queries inconsistently. Use transparent assets carefully, test logos/icons, avoid pure-black/white assumptions, and ensure semantic contrast survives mutation.
14
+ Rules:
27
15
 
28
- ## Image blocking/privacy
16
+ - **Dual-safe CTAs**: render a real styled HTML `<a>` inside a table cell for New Outlook and modern clients, wrapped in `<!--[if !mso]><!--> ... <!--<![endif]-->` only if a separate `<!--[if mso]>` VML `<v:roundrect>` fallback is needed—never hide the HTML fallback from New Outlook;
17
+ - test **both** New Outlook and Classic Outlook; a VML-only CTA or VML-only hero background renders as invisible or blank in New Outlook.
29
18
 
30
- - Assume images may not load initially or ever.
31
- - Essential copy/CTA/date/amount/action must be real text.
32
- - Alt text should communicate function/content, not filename.
33
- - Do not use hidden tracking imagery as a substitute for consent-aware measurement; privacy features can distort metrics.
34
-
35
- ## Plaintext parity
36
-
37
- Plaintext is a real interface: ordering, headings, URLs, list structure, dates/time zones, legal/footer links, preference/unsubscribe actions, and tone must make sense without HTML. Generate it from shared content where possible.
38
-
39
- ## RTL/localization/accessibility
19
+ ## Gmail / Google clients
40
20
 
41
- Test expansion, bidi punctuation/mixed URLs/email addresses, locale formats, font fallback, alt translation, line wrapping, screen-reader reading order, link purpose, target size on touch clients, high contrast, and zoom. Never assume text direction inheritance is consistent across clients.
21
+ - **102 KB clipping ceiling (`< 85–90 KB` pre-ESP target / `< 80 KB` ideal)**: Gmail clips the `text/html` MIME part strictly at **102 KB** (`104,448` UTF-8 bytes including whitespace, MSO comments, and ESP click-tracking URL rewrites), replacing the bottom of the email with `[Message clipped] View entire message` and hiding legal/unsubscribe footers plus open pixels. Keep **pre-ESP compiled HTML `< 85–90 KB`** so ESP link-wrapping never pushes final delivery over `102 KB`.
22
+ - **`<style>` size limit (`<= 8–16 KB`)**: Gmail webmail drops `<style>` blocks exceeding `~16 KB` and Gmail mobile apps drop around `~8 KB`; keep `<style>` **`<= 8–16 KB`** and inline critical layout/color properties.
23
+ - **Full `<style>` stripping on modern CSS (`@layer`, `@property`, CSS nesting)**: any unsupported at-rule or syntax inside `<style>`—specifically **`@layer`, `@property`, native CSS nesting (`& .child`), or unclosed declarations**—causes Gmail to discard the **entire** `<style>` block!
24
+ - **`GANGA` (Gmail Non-Google Account IMAP/POP) survival**: IMAP/POP accounts opened in Gmail iOS/Android strip `<style>` blocks completely; verify by deleting `<style>` in QA that **layout structure AND `>= 4.5:1` contrast remain intact on inline CSS alone**.
25
+ - **Image proxying & threading**: Gmail proxies remote images (requiring public HTTPS URLs) and groups threads; lead every message with clear subject, preheader, and opening live text.
26
+
27
+ ## 3-Regime Dark Mode Matrix
28
+
29
+ Email clients handle dark mode across **three incompatible regimes**. Never assume `@media (prefers-color-scheme: dark)` works everywhere:
30
+
31
+ | Regime | Representative clients | Color behavior | `@media (prefers-color-scheme: dark)` | Survival strategy |
32
+ |---|---|---|---|---|
33
+ | **1. No change** | Gmail Web (default), Yahoo Mail Web, legacy desktop webmail | Renders authored light/dark hex colors verbatim | Ignored | Authored baseline palette must have `>= 4.5:1` contrast with zero reliance on dark-mode CSS |
34
+ | **2. Partial color inversion / CSS opt-in** | Apple Mail (macOS/iOS), `Outlook.com` / New Outlook, `Gmail iOS` (partial surface rewrite) | Inverts light surfaces & dark text selectively; Apple Mail honors CSS dark media queries; Outlook exposes `[data-ogsc]` / `[data-ogsb]` | Honored in Apple Mail; Outlook uses `[data-ogsc]` / `[data-ogsb]` | Declare `<meta name="color-scheme" content="light dark">`, `@media (prefers-color-scheme: dark)` overrides with `!important`, `[data-ogsc]`/`[data-ogsb]` hooks, and `.light-img` / `.dark-img` swaps |
35
+ | **3. Full forced inversion** | `Gmail Android`, `Classic Outlook for Windows` (Dark Mode) | Algorithmically inverts **all** light backgrounds to `#121212`–`#1e1e1e` and dark text to light gray, **ignoring CSS media queries** | **Ignored** | Avoid pure `#000000` / `#ffffff` glare (use `#111827` on `#f8fafc` / `#ffffff`), and protect dark transparent PNG logos/icons with a **`1–2px` light keyline/halo or translucent light pill** so they never vanish on forced `#121212` backgrounds |
36
+
37
+ Dark-mode head boilerplate + dual-logo swap (with MSO hide guard so Classic Outlook never renders duplicate logos, plus light-pill fallback on the default logo for Regime 3):
38
+
39
+ ```html
40
+ <meta name="color-scheme" content="light dark">
41
+ <meta name="supported-color-schemes" content="light dark">
42
+ <style>
43
+ :root { color-scheme: light dark; supported-color-schemes: light dark; }
44
+ a[x-apple-data-detectors] {
45
+ color: inherit !important; text-decoration: none !important;
46
+ font-size: inherit !important; font-family: inherit !important;
47
+ font-weight: inherit !important; line-height: inherit !important;
48
+ }
49
+ @media (prefers-color-scheme: dark) {
50
+ .bg-page { background-color: #121417 !important; }
51
+ .bg-card { background-color: #1a1f26 !important; }
52
+ .text-body { color: #f1f5f9 !important; }
53
+ .light-img { display: none !important; }
54
+ .dark-img { display: block !important; width: auto !important; max-height: none !important; overflow: visible !important; }
55
+ }
56
+ [data-ogsc] .text-body { color: #f1f5f9 !important; }
57
+ [data-ogsb] .bg-card { background-color: #1a1f26 !important; }
58
+ [data-ogsc] .light-img { display: none !important; }
59
+ [data-ogsc] .dark-img { display: block !important; width: auto !important; max-height: none !important; overflow: visible !important; }
60
+ </style>
61
+
62
+ <!-- Default logo carries a subtle light keyline/pill so Regime 3 (Gmail Android / Classic Outlook) stays legible -->
63
+ <img class="light-img" src="https://example.com/logo-dark-with-keyline.png" width="132" height="32" alt="Acme" style="display:block;border:0;">
64
+ <!--[if !mso]><!-->
65
+ <div class="dark-img" style="display:none;overflow:hidden;width:0;max-height:0;mso-hide:all;">
66
+ <img src="https://example.com/logo-light.png" width="132" height="32" alt="Acme" style="display:block;border:0;">
67
+ </div>
68
+ <!--<![endif]-->
69
+ ```
70
+
71
+ - **Apple Intelligence inbox summaries**: iOS/macOS Mail generates AI summaries from opening live text, competing with manual preheaders. State sender, action, date, and amount plainly in the first real `<p>` instead of burying them in an image hero.
72
+
73
+ ## 2025–2026 Bulk Sender Mandate (Gmail, Yahoo, Outlook.com)
74
+
75
+ Mailbox providers enforce strict protocol gates at the SMTP/inbox edge (especially at `>= 5,000` messages/day to Gmail/Yahoo/Outlook.com, and best practice for every production domain):
76
+
77
+ | Requirement | Concrete specification | Promotional / Bulk | Transactional (Receipts, OTPs, Alerts) |
78
+ |---|---|---|---|
79
+ | **Authentication & alignment** | `SPF` + `DKIM` (`>= 2048-bit` RSA or Ed25519) + `DMARC` (`p=quarantine` or `p=reject` recommended; strict/relaxed alignment with visible `RFC5322.From`), valid forward/reverse DNS (`PTR`) | Mandatory | Mandatory (isolate on a dedicated subdomain e.g. `tx.example.com` so marketing reputation never delays OTPs) |
80
+ | **One-click unsubscribe (`RFC 8058`)** | Both `List-Unsubscribe: <https://example.com/unsub?t=...>, <mailto:unsub@...>` AND `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, plus a visible 1-click footer link; process within **`<= 48h` with zero login wall or survey gate** | **Mandatory** | **Omit** `List-Unsubscribe` on security/OTP/receipt mail—and **never** inject promotional cross-sells that reclassify transactional mail as marketing |
81
+ | **Spam complaint rate** | Monitor Google Postmaster Tools, Yahoo Sender Hub, and Microsoft SNDS | **`< 0.10%` target** (`>= 0.30%` triggers bulk rejection/spam routing) | `< 0.05%` expected |
82
+ | **Apple MPP analytics** | Apple Mail Privacy Protection pre-fetches tracking pixels via relay proxies regardless of whether the human opened the email | Measure **verified link clicks, conversions, and replies**; never trigger drip branches or purge lists solely from open pixels | Never use open pixels as delivery/read proof for legal or billing notices |
83
+ | **BIMI (optional brand trust)** | Enforced `DMARC` (`p=quarantine` or `p=reject`), square **SVG Tiny-PS** logo over HTTPS, and **VMC** / **CMC** certificate | Recommended | Recommended |
84
+
85
+ ## Preheaders, merge-tag fallbacks & interactive extensions
86
+
87
+ - **Preheader zero-width padding (`50–90` repeats / `~140+` chars)**: keep preview text concise (`40–90` chars) and follow it with **50–90 repeats** of `&#847;&zwnj;&nbsp;` (`~150–270` invisible characters). Repeating only 3–5 times pads ~12 characters and leaks `"View in browser"` or header `alt` text into 120–140 character inbox snippets:
88
+
89
+ ```html
90
+ <div style="display:none;max-height:0;overflow:hidden;mso-hide:all;" aria-hidden="true">
91
+ Invoice #2026-041 due 15 Dec — €1,420.50&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;<!-- repeat &#847;&zwnj;&nbsp; 50–90 times (~140+ chars) in compiled output -->
92
+ </div>
93
+ ```
94
+
95
+ - **Personalization merge-tag fallbacks**: guard every recipient variable (`{{ first_name | default: "there" }}`, Handlebars `{{#if firstName}}Hi {{firstName}},{{else}}Hello,{{/if}}`, or typed React Email props defaults) and test against a null/empty profile fixture so literal `{{name}}` or `"Hi ,"` never ships.
96
+ - **AMP for Email (`text/x-amp-html`)**: optional third MIME part (`text/plain`, `text/html`, `text/x-amp-html`) for interactive state in Gmail/Yahoo/Mail.ru. Requires SPF/DKIM/DMARC + sender approval, expires after ~30 days, and is ignored by Apple Mail and Outlook—always preserve full functional parity in `text/html` and `text/plain`.
97
+
98
+ ## Email accessibility & link-copy rules
99
+
100
+ - Set `lang="en"` (or exact BCP-47 locale) and `dir="ltr"` / `"rtl"` on `<html>` AND repeat `dir` on the main container table (some webmail clients strip `<html>` attributes).
101
+ - Include a descriptive `<title>` (announced by screen readers in webmail and browser views).
102
+ - Add `role="presentation"` (or `role="none"`) to **every** layout `<table>` so assistive technologies do not announce table row/column grids; leave real tabular data tables with semantic `<th>` headers and no `role="presentation"`.
103
+ - Mark decorative spacer cells, zero-width preheader blocks, and visual dividers with `aria-hidden="true"`, and set `alt=""` on purely decorative images.
104
+ - Use real semantic headings (`<h1>`–`<h3>`), `<p>` elements with inline typography, and **descriptive anchor text (`"Download Invoice #2026-041"`, never `"click here"` or bare tracking URLs)**.
105
+
106
+ ## Image blocking and plaintext parity
107
+
108
+ - Assume images may never load: essential copy, CTA, dates, amounts, and links must be live HTML text; alt text must convey meaning rather than filenames.
109
+ - Plaintext (`text/plain`) is a first-class surface: preserve reading order, absolute URLs, dates/time zones, merge-tag fallbacks, legal/preference/unsubscribe links, and clear section breaks generated from the same data model as HTML.
42
110
 
43
111
  ## Verification matrix
44
112
 
45
- At minimum record: client/app/version, OS/device, light/dark, images on/off, viewport width, zoom/text size, plaintext/HTML, forwarded/not forwarded, link destination/expiry, clipping status. Anything not tested is `not-checked`; never claim “works in all clients.”
113
+ Record: client/app/version (**New Outlook** vs **Classic Outlook**, Gmail Web/iOS/Android + **`GANGA` `<style>`-stripped IMAP/POP**, Apple Mail), OS/device, all 3 dark-mode regimes, images on/off, null-merge-tag fallback test, viewport width, zoom/text size, pre-ESP HTML byte size vs **`< 85–90 KB` target** / `102 KB` cap, `<style>` `<= 8–16 KB` (`0` `@layer`/`@property`/nesting), plaintext parity, `RFC 8058` / `SPF` / `DKIM` / `DMARC` headers, and accessibility inspection (`rendered` vs `static` vs `not-checked`).
@@ -1,53 +1,114 @@
1
1
  # Hand-authored HTML tables
2
2
 
3
+ ## Accessible table skeleton
4
+
5
+ Always include `lang`, `dir`, `<title>`, dark-mode meta opt-in, a hidden preheader with zero-width padding, `role="presentation"` on every layout table, and semantic headings/paragraphs:
6
+
7
+ ```html
8
+ <!DOCTYPE html>
9
+ <html lang="en" dir="ltr" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
10
+ <head>
11
+ <meta charset="utf-8">
12
+ <meta name="viewport" content="width=device-width,initial-scale=1">
13
+ <meta name="x-apple-disable-message-reformatting">
14
+ <meta name="color-scheme" content="light dark">
15
+ <meta name="supported-color-schemes" content="light dark">
16
+ <title>Invoice #2026-041 due 15 Dec</title>
17
+ </head>
18
+ <body style="margin:0;padding:0;background-color:#f4f5f7;">
19
+ <!-- Repeat &#847;&zwnj;&nbsp; 50–90 times (~140–200+ rendered chars); 3–5 repeats only pad ~9–15 chars and leak "View in browser" or logo alt text into 120-char inbox snippets -->
20
+ <div style="display:none;max-height:0;overflow:hidden;mso-hide:all;" aria-hidden="true">
21
+ Invoice #2026-041 due 15 Dec — €1,420.50&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;&#847;&zwnj;&nbsp;
22
+ </div>
23
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" dir="ltr" style="background-color:#f4f5f7;">
24
+ <tr>
25
+ <td align="center" style="padding:24px 12px;">
26
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="max-width:600px;background-color:#ffffff;border-radius:6px;">
27
+ <tr>
28
+ <td style="padding:28px 24px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;color:#111827;">
29
+ <h1 style="margin:0 0 12px;font-size:22px;line-height:1.3;">Invoice #2026-041</h1>
30
+ <p style="margin:0 0 20px;font-size:15px;line-height:1.5;">Amount due: €1,420.50 by 15 Dec 2026.</p>
31
+ <!-- Bulletproof Dual-Engine CTA: VML roundrect for Classic Outlook Word + table/td bgcolor + padded <a> for New Outlook, Gmail, and Apple Mail -->
32
+ <!--[if mso]>
33
+ <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"
34
+ href="https://example.com/pay/2026-041"
35
+ style="height:44px;v-text-anchor:middle;width:220px;" arcsize="14%" stroke="f" fillcolor="#0f5132">
36
+ <w:anchorlock/>
37
+ <center style="color:#ffffff;font-family:'Segoe UI',Arial,sans-serif;font-size:15px;font-weight:600;">
38
+ Review and pay invoice
39
+ </center>
40
+ </v:roundrect>
41
+ <![endif]-->
42
+ <!--[if !mso]><!-->
43
+ <table role="presentation" cellspacing="0" cellpadding="0" border="0">
44
+ <tr>
45
+ <td align="center" bgcolor="#0f5132" style="border-radius:6px;background-color:#0f5132;">
46
+ <a href="https://example.com/pay/2026-041"
47
+ style="display:inline-block;padding:12px 24px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;font-size:15px;font-weight:600;line-height:20px;color:#ffffff;text-decoration:none;border-radius:6px;border:1px solid #0f5132;">
48
+ Review and pay invoice
49
+ </a>
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ <!--<![endif]-->
54
+ </td>
55
+ </tr>
56
+ </table>
57
+ </td>
58
+ </tr>
59
+ </table>
60
+ </body>
61
+ </html>
62
+ ```
63
+
3
64
  ## Token mapping
4
65
 
5
- Email clients inconsistently support CSS variables. Treat generated token output as source-of-truth values but inline final literal colors/spacing into attributes/styles. Keep a build-time constants map so semantic names remain meaningful before compilation.
66
+ Email clients inconsistently support CSS variables. Treat generated token output as source-of-truth values, then inline final 6-digit hex colors and `px` measurements into attributes and `style` props. Keep a build-time constants map so semantic names remain meaningful before compilation.
6
67
 
7
68
  ## Layout and responsive idioms
8
69
 
9
- Use table structure because it remains the most reliable baseline: outer background table, fixed/max-width container, single-column-first modules, aligned cells, inline CSS, `role="presentation"` where appropriate, MSO conditional comments only when justified. Design mobile behavior through width/max-width/fluid-hybrid techniques rather than modern grid assumptions.
10
-
11
- ## Typography/custom fonts
12
-
13
- Use robust websafe fallback stacks. Custom fonts may be progressive enhancement in supporting clients only; never let meaning/layout depend on them. Use real text, explicit line-height/measure constraints, and localization expansion tolerance.
70
+ Use table structure as the baseline: outer background table, `max-width: 600px` centered container, single-column-first modules, `role="presentation"` on every layout `<table>`, explicit `cellspacing="0" cellpadding="0" border="0"`, inline CSS, and narrowly scoped MSO conditional comments only when Classic Outlook requires them. Never hide the primary HTML button inside `<!--[if mso]>`—New Outlook ignores MSO comments and VML. Design mobile stacking through fluid-hybrid `max-width` + `display: inline-block` ghost tables rather than CSS Grid or Flexbox.
14
71
 
15
- ## Motion/reduced motion
72
+ ## Typography and custom fonts
16
73
 
17
- Assume animation is unsupported/inconsistent. Never require animation to communicate state or meaning. Static fallback is the baseline, not an alternate version.
74
+ Use robust websafe fallback stacks. Custom fonts are progressive enhancement only; never let meaning or layout depend on them. Set explicit `font-size`, `line-height`, and `color` directly on text containers (`<p>`, `<h1>`–`<h3>`, `<td>`) because Classic Outlook resets font inheritance across nested tables.
18
75
 
19
- ## Accessibility specifics
76
+ ## Motion and reduced motion
20
77
 
21
- Real text, meaningful alt text, empty alt for decorative imagery where honored, heading-like structure where clients permit, logical reading order, sufficient contrast, padded visible CTA hit area, descriptive links, plaintext parity. Tables should not expose layout noise to screen readers where roles are supported.
78
+ Assume animation is unsupported or stripped. Never require animation to communicate state or meaning. Static fallback is the baseline.
22
79
 
23
- ## States idiom
80
+ ## Accessibility & personalization specifics
24
81
 
25
- Email is mostly asynchronous communication, not live application state. Critical states are: images off, dark-mode inversion, clipped message, blocked/remote-content warning, plaintext-only, forwarded/quoted, print, narrow mobile viewport, high-contrast mode. Design each deliberately.
82
+ - Always set `lang` and `dir` on `<html>` and repeat `dir` on the root content table.
83
+ - Always include `<title>` and `role="presentation"` on every layout table (never on real data tables).
84
+ - Mark decorative spacers with `aria-hidden="true"` and decorative images with `alt=""`.
85
+ - Use real `<h1>`–`<h3>` headings, `<p>` copy, **descriptive link text (never `"click here"`)**, **merge-tag fallbacks** (never outputting raw `{{name}}` when fields are empty), `4.5:1+` inline contrast, padded CTA hit areas, and matching `text/plain` MIME parity.
26
86
 
27
- ## Forms idiom
87
+ ## States and forms
28
88
 
29
- Do not depend on interactive forms inside email. Link to a preauthenticated/preferences page or clearly labeled web destination. Preserve user context safely; never expose sensitive tokens or require re-entering information already known when a secure flow can carry it.
89
+ Critical email states are: images off, dark-mode inversion, **Gmail `GANGA` (IMAP/POP `<style>` stripped completely)**, Gmail `102 KB` clipping (`< 85–90 KB` pre-ESP target), null/empty personalization merge tags, remote-content warning, plaintext-only, forwarded/quoted, print, narrow mobile viewport, and high-contrast mode. Do not depend on embedded HTML forms—link to a secure, context-preserving web destination instead.
30
90
 
31
91
  ## Do/don't pairs
32
92
 
33
93
  | Do | Don't |
34
94
  |---|---|
35
- | inline critical CSS plus table-based baseline | relying on external stylesheets/grid/flex support |
36
- | real HTML text for primary copy/CTA | image-only hero containing essential content |
37
- | explicit alt/plaintext fallback | blank white boxes when images are blocked |
38
- | single-column-first information order | fragile multi-column design dependent on exact viewport |
39
- | MSO conditional workaround narrowly scoped | Outlook hacks scattered through every module |
95
+ | Set `lang`, `dir`, `<title>`, descriptive link copy, and `role="presentation"` on every layout `<table>` | Omit `role="presentation"` or write vague `"click here"` anchors |
96
+ | Inline 6-digit hex and `px` values so layout & contrast survive **`GANGA` (`<style>` stripped)**, keeping `<style>` **`<= 8–16 KB`** with **zero `@layer`, `@property`, or CSS nesting** | Emit `@layer` / `@property` / CSS nesting inside `<style>` (causing Gmail to strip the entire `<style>` block!) or rely on CSS variables, `oklch()`, Flexbox, or Grid |
97
+ | Use a Bulletproof Dual-Engine CTA (`<!--[if mso]><v:roundrect>` + `<!--[if !mso]><!--><table role="presentation"><tr><td bgcolor>` wrapping styled `<a>`) and explicit **merge-tag fallbacks** | Ship a bare `<a style="padding:...">`, a VML-only button, or unguarded `{{name}}` tags that leak raw syntax |
98
+ | Pad hidden preheaders with 50–90 repeats (`~140+` chars) of `&#847;&zwnj;&nbsp;` | Use 3–5 repeats that let `"View in browser"` or header alt text leak into 120-char inbox previews |
99
+ | Add a `1–2px` light keyline/halo or translucent pill to dark logos alongside `.light-img`/`.dark-img` swaps | Export pure black transparent PNG logos that vanish on forced `#121212` dark backgrounds (`Gmail Android` / `Outlook Windows`) |
100
+ | Keep pre-ESP compiled HTML **`< 85–90 KB`** (`< 102 KB` post-ESP hard Gmail clip cap) and wire `RFC 8058` one-click unsubscribe on promotional mail | Ship bloated nested tables that clip legal/unsubscribe footers after ESP link wrapping or gate unsubscribe behind a login wall |
40
101
 
41
102
  ## Known traps
42
103
 
43
- Outlook Word renderer, Gmail clipping/style stripping, image blocking, dark-mode color inversion, forwarding mutations, padding/margin inconsistency, button border-radius/background-image support, linked-image dimensions disappearing, plaintext divergence, tracking pixels misrepresenting engagement.
104
+ New Outlook vs Classic Outlook divergence, Gmail `102 KB` clipping (`< 85–90 KB` pre-ESP headroom before ESP tracking URLs), Gmail stripping the entire `<style>` block on `@layer`/`@property`/nesting or `> 8–16 KB`, `GANGA` dropping `<style>` completely, raw `{{merge_tag}}` leaks, `"click here"` links, forced dark-mode logo disappearance, Apple MPP proxy open inflation, and plaintext divergence.
44
105
 
45
106
  ## Verification commands
46
107
 
47
- Run the repository's email build/template validation pipeline without suppressing failures (for example, `npm run build` or your template compiler):
108
+ Run the repository's email build/template validation pipeline without suppressing failures:
48
109
 
49
110
  ```sh
50
111
  npm run build
51
112
  ```
52
113
 
53
- Use actual client previews/screenshots or a testing service; inspect source size/clipping, plaintext MIME, image-off rendering, dark mode, narrow/wide layouts, high contrast, links, spam/deliverability checks where available.
114
+ Inspect pre-ESP HTML byte size (`< 85–90 KB` target / `< 102 KB` cap) and `<style>` size (`<= 8–16 KB`, zero `@layer`/`@property`/nesting, `static`), validate `lang`/`dir`/`role="presentation"`, merge-tag fallbacks, descriptive links, and plaintext parity (`static`), and test real client previews across New Outlook, Classic Outlook, Gmail (Web/iOS/Android + `<style>`-stripped `GANGA`), and Apple Mail across all 3 dark-mode regimes with images off (`rendered`).
@@ -0,0 +1,54 @@
1
+ # Maizzle (Tailwind CSS email build pipeline)
2
+
3
+ Use **Maizzle** when authoring HTML emails with Tailwind CSS utility workflows while still shipping table-safe, inlined, purged production HTML. Pair with `references/client-quirks.md` for New Outlook vs Classic Outlook, Gmail 102 KB clipping, dark mode, and plaintext parity.
4
+
5
+ ## Production build configuration
6
+
7
+ - Enable CSS inlining (`css.inline: true`), unused CSS purging (`css.purge: true`), safe class names (`css.safe: true`), six-digit hex normalization (`css.sixHex: true`), and companion plaintext generation (`plaintext: true`) in `maizzle.config.ts`.
8
+ - Keep table-based outer layout containers (`role="presentation"`) with explicit `lang` and `dir` for Outlook Word-engine parity; do not rely on Tailwind `grid` or `flex` for multi-column email layouts.
9
+
10
+ ```ts
11
+ // maizzle.config.ts
12
+ import { defineConfig } from '@maizzle/framework';
13
+
14
+ export default defineConfig({
15
+ plaintext: true, // emits companion .txt alongside compiled .html
16
+ css: {
17
+ inline: true,
18
+ purge: true,
19
+ safe: true,
20
+ shorthand: true,
21
+ sixHex: true,
22
+ preferUnitless: true,
23
+ },
24
+ });
25
+ ```
26
+
27
+ ## Tailwind v3 vs v4 inlining caveats
28
+
29
+ - **Tailwind v3** (standard Maizzle baseline): generates hex/RGB utilities and predictable class rules that Maizzle's PostCSS + Juice inliner resolves cleanly into inline `style` attributes.
30
+ - **Tailwind v4 hazards**: Tailwind v4 emits CSS custom properties (`var(--color-*)`), `oklch()` / `color-mix()` color functions, `rem` defaults, native CSS nesting, and `@layer` wrappers. Gmail discards the **entire** `<style>` block on `@layer` or syntax errors, and Classic Outlook ignores `var()`, `oklch()`, and `rem`.
31
+ - If upgrading a Maizzle pipeline toward Tailwind v4, verify in compiled `.html` output (`static`) that **all** CSS variables are resolved to static values, `oklch()` is converted to 6-digit hex (`sixHex: true`), spacing/type use `px`, and zero `@layer` blocks remain in `<style>`.
32
+
33
+ ## Email-specific Maizzle rules
34
+
35
+ - **New Outlook vs Classic Outlook**: wrap Classic Outlook-only VML fallbacks strictly in `<!--[if mso]>...<![endif]-->` and keep a real styled HTML `<a>` CTA outside `<!--[if mso]>` so New Outlook (which ignores MSO comments and VML) still renders a working button. Check that `css.purge` preserves dark-mode (`@media (prefers-color-scheme: dark)` / `[data-ogsc]`) classes.
36
+ - **Gmail 102 KB clipping**: keep compiled HTML well under 102 KB (`css.purge: true` + concise table markup) so Gmail does not clip legal footers and unsubscribe links.
37
+ - **Plaintext parity**: enable `plaintext: true` (or configure `plaintext: { destination: { path: 'build_production/text' } }`) and inspect the generated `.txt` file for clean link preservation and reading order.
38
+
39
+ ## Do/don't pairs
40
+
41
+ | Do | Don't |
42
+ |---|---|
43
+ | Enable `plaintext: true`, `css.inline`, `css.purge`, `css.safe`, and `css.sixHex` in production builds | Ship raw Tailwind classes, `var(--*)`, `oklch()`, `@layer`, or HTML-only emails without plaintext |
44
+ | Use `role="presentation"` tables with `lang`/`dir` for multi-column layouts inside Maizzle templates | Use CSS Grid or Flexbox for multi-column email structure |
45
+ | Check compiled HTML byte size against Gmail's 102 KB clipping threshold and verify zero `@layer` in `<style>` | Ignore bloated inline styles or Tailwind v4 syntax that causes Gmail to drop `<style>` |
46
+ | Test built output in real email clients (New Outlook, Classic Outlook, Gmail, Apple Mail; dark mode + images off) | Treat `maizzle serve` browser preview as proof of inbox rendering |
47
+
48
+ ## Verification commands
49
+
50
+ ```sh
51
+ npx maizzle build production
52
+ ```
53
+
54
+ Inspect compiled HTML byte size, resolved inline hex/`px` values, absence of `@layer`/`oklch()`, and generated `.txt` plaintext parity (`static`), then test the sent email across real clients with dark mode and images disabled (`rendered`).
@@ -18,11 +18,11 @@ Do not depend on motion. MJML is for resilient static-ish email; interactive/car
18
18
 
19
19
  ## Accessibility specifics
20
20
 
21
- MJML abstracts structure but does not guarantee meaningful email UX. Supply alt text, real text, semantic reading order, descriptive buttons/links, contrast-aware colors, plaintext counterpart, sensible preheader, and keyboard/touch target size on destination links/buttons where client capabilities permit.
21
+ MJML abstracts table markup (`role="presentation"` is emitted automatically on layout tables), but authors still own semantics: set `lang` and `dir` on `<mjml lang="en" dir="ltr">`, add `<mj-title>` and `<mj-preview>`, supply meaningful `alt` text (or `alt=""` for decorative images), use real `<h1>`–`<h3>` inside `<mj-text>`, maintain contrast under dark-mode inversion, and pair with a `text/plain` version.
22
22
 
23
23
  ## States idiom
24
24
 
25
- Validate images off/blocked, dark mode, clipping, plaintext, forwarding, narrow viewport, high contrast, print, missing remote assets. Ensure CTA/meaning work if styling is degraded.
25
+ Validate images off/blocked, dark mode, Gmail 102 KB clipping, plaintext, forwarding, narrow viewport, high contrast, print, and missing remote assets. Ensure CTA and core message survive if styling degrades.
26
26
 
27
27
  ## Forms idiom
28
28
 
@@ -32,21 +32,23 @@ Do not depend on forms in email. Link to secure web flows with preauthenticated
32
32
 
33
33
  | Do | Don't |
34
34
  |---|---|
35
- | build reusable mj-section/component patterns | hand-editing compiled HTML after every build |
36
- | `mj-button` with real text/href/fallback color | image-only CTA |
37
- | isolated justified `mj-raw` escape hatch | raw HTML everywhere defeating MJML's purpose |
38
- | concise alt text such as `alt="Monthly usage chart"` | missing/useless alt like `alt="image"` |
39
- | inspect generated output/source size | assuming MJML abstraction guarantees client compatibility |
35
+ | build reusable `mj-section`/`mj-attributes` patterns with `<mjml lang="..." dir="...">` | hand-editing compiled HTML after every build |
36
+ | `mj-button` with real text, `href`, and solid fallback background color | image-only CTA |
37
+ | isolated, justified `mj-raw` escape hatch (keeping New Outlook & Classic Outlook working) | raw HTML everywhere defeating MJML's purpose |
38
+ | concise alt text such as `alt="Monthly usage chart"` | missing or useless alt like `alt="image"` |
39
+ | check compiled HTML byte size against Gmail's 102 KB clipping cap | assuming MJML output stays compact automatically |
40
40
 
41
41
  ## Known traps
42
42
 
43
- Compiled output divergence from mental model, raw escape overuse, custom font assumptions, section/column nesting errors, dark-mode mutation, image blocking, Gmail clipping due size, Outlook-specific rendering surprises, plaintext not generated from same content model.
43
+ Compiled output weight triggering Gmail 102 KB clipping, raw escape overuse breaking New Outlook vs Classic Outlook parity, custom font assumptions, section/column nesting errors, dark-mode mutation, image blocking, and plaintext not generated from the same content model.
44
44
 
45
45
  ## Verification commands
46
46
 
47
+ Compile with strict validation and run the repo build without suppressing failures:
48
+
47
49
  ```sh
48
- npx mjml input.mjml -o output.html
49
- npm run build 2>/dev/null || true
50
+ npx mjml input.mjml -o output.html --config.validationLevel strict
51
+ npm run build
50
52
  ```
51
53
 
52
- Inspect compiled source and actual client previews. Validate image-off, dark mode, mobile width, plaintext, clipping, forwarding, links/UTM correctness, and accessibility manually or through a preview service.
54
+ Inspect compiled HTML byte size (`static`) and actual client previews across New Outlook, Classic Outlook, Gmail, and Apple Mail with image-off, dark mode, mobile width, plaintext, forwarding, and accessibility checks (`rendered`).
@@ -1,53 +1,95 @@
1
- # React Email
2
-
3
- ## Token mapping
4
-
5
- Use typed semantic constants in shared modules and pass them into components/styles. React Email compiles JSX to email-oriented HTML, but client CSS support remains fragmented; do not assume CSS variables/modern selectors survive. Shared constants preserve semantic token intent while final output inlines literal values.
6
-
7
- ## Layout and responsive idioms
8
-
9
- Use React Email components (`Html`, `Body`, `Container`, `Section`, `Row`, `Column`, `Text`, `Button`, `Img`, `Preview`) or project equivalents deliberately. Single-column-first ordering and resilient inline styles remain mandatory. Component abstraction does not make email a normal React web app.
10
-
11
- ## Typography/custom fonts
12
-
13
- Use fallback font stacks and real text. Custom fonts are progressive enhancement only. Avoid layout that depends on exact metrics. Include plaintext generation using the same structured content where possible rather than hand-diverging copy.
14
-
15
- ## Motion/reduced motion
16
-
17
- Assume animation/interactivity is unsupported. Email meaning and CTA must work statically.
1
+ # React Email and component email ecosystems
2
+
3
+ ## React Email (v3/v4+) core idioms
4
+
5
+ React Email compiles JSX primitives (`Html`, `Head`, `Body`, `Preview`, `Container`, `Section`, `Row`, `Column`, `Heading`, `Text`, `Button`, `Img`, `Font`, `CodeBlock`, `Markdown`, `Tailwind`) to table-safe HTML. Component abstraction does not turn email into browser React—CSS variables, Grid, and client-side hooks do not exist in inboxes.
6
+
7
+ ```tsx
8
+ import {
9
+ Html, Head, Body, Preview, Container, Section,
10
+ Heading, Text, Button, Font, Tailwind, pixelBasedPreset, render,
11
+ } from '@react-email/components';
12
+
13
+ export function InvoiceEmail({ invoiceId, total }: { invoiceId: string; total: string }) {
14
+ return (
15
+ <Html lang="en" dir="ltr">
16
+ <Head>
17
+ <Font
18
+ fontFamily="Inter"
19
+ fallbackFontFamily="Arial"
20
+ webFont={{ url: 'https://example.com/fonts/inter-v18.woff2', format: 'woff2' }}
21
+ fontWeight={400}
22
+ fontStyle="normal"
23
+ />
24
+ </Head>
25
+ <Preview>Invoice {invoiceId} due — {total}</Preview>
26
+ <Tailwind config={{ presets: [pixelBasedPreset] }}>
27
+ <Body className="bg-[#f4f5f7] font-sans m-0 p-6">
28
+ <Container className="bg-white max-w-[600px] p-6 rounded">
29
+ <Section>
30
+ <Heading as="h1" className="text-[22px] text-[#111827] m-0 mb-3">
31
+ Invoice {invoiceId}
32
+ </Heading>
33
+ <Text className="text-[15px] text-[#374151] m-0 mb-5">
34
+ Total due: {total}.
35
+ </Text>
36
+ <Button
37
+ href={`https://example.com/pay/${invoiceId}`}
38
+ className="bg-[#0f5132] text-white px-5 py-3 rounded font-semibold"
39
+ >
40
+ Review and pay invoice
41
+ </Button>
42
+ </Section>
43
+ </Container>
44
+ </Body>
45
+ </Tailwind>
46
+ </Html>
47
+ );
48
+ }
49
+
50
+ // React Email v3+: render() is async; generate HTML + plaintext from the exact same tree
51
+ const html = await render(<InvoiceEmail invoiceId="2026-041" total="€1,420.50" />);
52
+ const text = await render(<InvoiceEmail invoiceId="2026-041" total="€1,420.50" />, {
53
+ plainText: true,
54
+ });
55
+ ```
18
56
 
19
- ## Accessibility specifics
57
+ Key v3/v4+ patterns:
20
58
 
21
- Real text, meaningful alt text, logical reading order, descriptive link/button copy, contrast-aware styling, plaintext parity, preheader text, no image-only essential content. Inspect rendered HTML because component names do not guarantee client semantics.
59
+ - **`<Tailwind>` + `pixelBasedPreset`**: Tailwind v4 defaults to `rem` units, CSS custom properties, and `oklch()` colors, which break Outlook and trigger Gmail `<style>` stripping. Pass `config={{ presets: [pixelBasedPreset] }}` so spacing/type emit `px` and colors emit email-safe hex/RGB.
60
+ - **Async `render()` + `{ plainText: true }`**: always `await render(element)` and derive the `text/plain` MIME part via `await render(element, { plainText: true })` from the same component tree so links, amounts, and legal text stay in sync.
61
+ - **`<Font fallbackFontFamily=...>`**: always specify a websafe `fallbackFontFamily` (`Arial`, `Helvetica`, `Georgia`, `Verdana`) because Classic Outlook and Gmail ignore `@font-face` and otherwise fall back to Times New Roman.
62
+ - **`<CodeBlock>` & `<Markdown>`**: use for developer notifications, release digests, or API key instructions while verifying line wrapping on 320px viewports and total HTML size against Gmail's 102 KB clipping limit.
22
63
 
23
- ## States idiom
64
+ ## Related component frameworks and ESP platforms
24
65
 
25
- Test images blocked/off, dark mode inversion/mutation, Gmail clipping, plaintext-only, forwarding/quoting, narrow mobile view, print/high contrast, missing assets. Transactional email also needs expired-link/already-used/unauthorized destination states on the destination page, though the email itself cannot solve them.
66
+ - **Vue Email / Svelte Email**: in Vue/Nuxt or SvelteKit stacks, use `@vue-email/components` (Vue Email) or `svelte-email` / `better-svelte-email` with the same inline-style, table-baseline, and plaintext-parity rules rather than shipping raw SPA templates.
67
+ - **Sending & authoring platforms**: **Resend** accepts React Email components natively (`react: <InvoiceEmail />` alongside `text`); **Loops** targets SaaS lifecycle/transactional workflows with MJML/API templates; **Postmark** focuses on high-deliverability transactional streams with Mustachio templates; **Stripo** offers visual + code hybrid authoring with AMP and Outlook export. Regardless of ESP, inspect the **delivered** HTML after link-tracking rewrites.
68
+ - **Can I email (`caniemail.com`)**: check support matrices before using any non-trivial CSS property (`gap`, `border-radius`, `aspect-ratio`, `@media (prefers-color-scheme)`).
26
69
 
27
- ## Forms idiom
70
+ ## Accessibility, states, and forms
28
71
 
29
- Do not depend on embedded forms. Link to secure destination flows. Use correct preheader/copy so users understand consequence before clicking.
72
+ - Set `lang` and `dir` on `<Html>`, use real `<Heading as="h1"|"h2">` and `<Text>`, meaningful `alt` on `<Img>`, explicit `<Preview>`, and verify rendered HTML contains `role="presentation"` on layout tables.
73
+ - Test images blocked, dark-mode inversion, Gmail 102 KB clipping, plaintext-only, forwarding/quoting, narrow mobile widths, and destination-page error states (expired/already-used transactional links).
74
+ - Never embed interactive forms inside email; link to a secure web route.
30
75
 
31
76
  ## Do/don't pairs
32
77
 
33
78
  | Do | Don't |
34
79
  |---|---|
35
- | shared typed content model feeding HTML + plaintext | manually maintaining divergent plaintext copy |
36
- | real `Button`/link text with consequence verb | image-only or “Click here” CTA |
37
- | semantic constants passed to inline styles | assuming CSS variables/classes work everywhere |
38
- | preview/preheader written deliberately | first legal/footer text accidentally becoming preview |
39
- | inspect compiled HTML/client rendering | trusting React component rendering in isolation |
40
-
41
- ## Known traps
42
-
43
- Treating output like normal web React, inconsistent plaintext, missing alt/preheader, style prop assumptions, client-specific mutation, clipping due output weight, dark-mode logo disappearance, generated HTML bloat, local preview looking better than real clients.
80
+ | Wrap `<Tailwind config={{ presets: [pixelBasedPreset] }}>` when using Tailwind utilities | Ship raw Tailwind v4 `rem`, `oklch()`, or `@layer` rules into email `<style>` blocks |
81
+ | Generate HTML and plaintext via `await render(el)` and `await render(el, { plainText: true })` | Manually maintain divergent plaintext templates or call v2 synchronous `render()` |
82
+ | Always set `fallbackFontFamily` on `<Font>` and `lang`/`dir` on `<Html>` | Let Classic Outlook collapse missing web fonts into Times New Roman |
83
+ | Inspect exported HTML byte size and real client renders (New Outlook + Classic Outlook + Gmail + Apple Mail) | Treat `npx email dev` local browser preview as proof of inbox rendering |
44
84
 
45
85
  ## Verification commands
46
86
 
87
+ Run static lint, build, and non-blocking static HTML export without suppressing failures:
88
+
47
89
  ```sh
48
90
  npm run lint
49
91
  npm run build
50
- npx email dev 2>/dev/null || true
92
+ npx email export
51
93
  ```
52
94
 
53
- Use local preview only as initial evidence. Validate compiled HTML/plaintext, image-off/dark/mobile/high-contrast rendering, actual client previews/test service, link destinations/expiry behavior, and clipping/source size.
95
+ Inspect exported HTML size against Gmail's 102 KB clipping threshold and validate plaintext output (`static`), then verify real client previews with dark mode and images off (`rendered`).