@thanhnguyxn/pixelcraft 0.0.0-stage → 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.
- package/.agents/plugins/marketplace.json +20 -0
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +22 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/LICENSE +21 -0
- package/README.md +264 -2
- package/SECURITY.md +28 -0
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +852 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/DESIGN-RATIONALE.md +191 -0
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +37 -0
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/README.md +36 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/direction-prototype-complexity.json +29 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-brownfield-evidence.json +28 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/visual-qa-task-evidence.json +29 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +74 -0
- package/evals/pixelcraft-brandkit.md +58 -0
- package/evals/pixelcraft-chat-ui.md +55 -0
- package/evals/pixelcraft-constrained.md +55 -0
- package/evals/pixelcraft-craft.md +76 -0
- package/evals/pixelcraft-data-apps.md +55 -0
- package/evals/pixelcraft-dataviz.md +59 -0
- package/evals/pixelcraft-desktop.md +55 -0
- package/evals/pixelcraft-direction.md +77 -0
- package/evals/pixelcraft-document.md +55 -0
- package/evals/pixelcraft-email.md +55 -0
- package/evals/pixelcraft-extensions.md +55 -0
- package/evals/pixelcraft-game-ui.md +59 -0
- package/evals/pixelcraft-handoff.md +57 -0
- package/evals/pixelcraft-media.md +55 -0
- package/evals/pixelcraft-mobile.md +59 -0
- package/evals/pixelcraft-patterns.md +73 -0
- package/evals/pixelcraft-plan.md +127 -0
- package/evals/pixelcraft-review.md +63 -0
- package/evals/pixelcraft-spatial.md +55 -0
- package/evals/pixelcraft-tokens.md +57 -0
- package/evals/pixelcraft-tui.md +55 -0
- package/evals/pixelcraft-ux.md +59 -0
- package/evals/pixelcraft-visual-qa.md +86 -0
- package/evals/pixelcraft-web.md +89 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +6 -0
- package/install.ps1 +341 -0
- package/install.sh +512 -0
- package/package.json +91 -4
- package/plugin.json +29 -0
- package/scripts/build-adapters.mjs +288 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +61 -0
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +203 -0
- package/scripts/test-export-tokens.mjs +361 -0
- package/scripts/test-finish-gate.mjs +271 -0
- package/scripts/test-installers.mjs +216 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +87 -0
- package/scripts/test-slop-scan.mjs +416 -0
- package/scripts/test-style-inventory.mjs +234 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +195 -0
- package/scripts/validate-skills.mjs +658 -0
- package/skills/pixelcraft/SKILL.md +155 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +90 -0
- package/skills/pixelcraft/references/report-template.md +49 -0
- package/skills/pixelcraft/references/stack-detection.md +226 -0
- package/skills/pixelcraft/references/surface-acceptance.md +52 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
- package/skills/pixelcraft-accessibility/SKILL.md +54 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
- package/skills/pixelcraft-accessibility/references/verification.md +64 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
- package/skills/pixelcraft-brandkit/SKILL.md +127 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
- package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
- package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
- package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
- package/skills/pixelcraft-constrained/SKILL.md +52 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
- package/skills/pixelcraft-craft/SKILL.md +58 -0
- package/skills/pixelcraft-craft/references/color.md +125 -0
- package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
- package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
- package/skills/pixelcraft-craft/references/layout.md +73 -0
- package/skills/pixelcraft-craft/references/motion.md +163 -0
- package/skills/pixelcraft-craft/references/typography.md +110 -0
- package/skills/pixelcraft-data-apps/SKILL.md +86 -0
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +109 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
- package/skills/pixelcraft-data-apps/references/panel.md +99 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
- package/skills/pixelcraft-dataviz/SKILL.md +60 -0
- package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
- package/skills/pixelcraft-desktop/SKILL.md +93 -0
- package/skills/pixelcraft-desktop/references/appkit.md +92 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
- package/skills/pixelcraft-desktop/references/electron.md +96 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/gtk.md +97 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/tauri.md +110 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
- package/skills/pixelcraft-desktop/references/working-context.md +84 -0
- package/skills/pixelcraft-direction/SKILL.md +120 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +64 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +71 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +58 -0
- package/skills/pixelcraft-document/references/archetypes.md +106 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +187 -0
- package/skills/pixelcraft-document/references/slides.md +198 -0
- package/skills/pixelcraft-email/SKILL.md +80 -0
- package/skills/pixelcraft-email/references/client-quirks.md +113 -0
- package/skills/pixelcraft-email/references/html-tables.md +114 -0
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +54 -0
- package/skills/pixelcraft-email/references/react-email.md +95 -0
- package/skills/pixelcraft-extensions/SKILL.md +56 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +98 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
- package/skills/pixelcraft-game-ui/SKILL.md +80 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
- package/skills/pixelcraft-game-ui/references/godot.md +130 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +50 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +49 -0
- package/skills/pixelcraft-media/references/banners-video.md +130 -0
- package/skills/pixelcraft-media/references/og-generation.md +154 -0
- package/skills/pixelcraft-media/references/social-cards.md +71 -0
- package/skills/pixelcraft-mobile/SKILL.md +86 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
- package/skills/pixelcraft-mobile/references/flet.md +80 -0
- package/skills/pixelcraft-mobile/references/flutter.md +113 -0
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
- package/skills/pixelcraft-mobile/references/kivy.md +82 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
- package/skills/pixelcraft-mobile/references/uikit.md +92 -0
- package/skills/pixelcraft-patterns/SKILL.md +75 -0
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +47 -0
- package/skills/pixelcraft-patterns/references/communication.md +45 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +44 -0
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +51 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +103 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +134 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
- package/skills/pixelcraft-review/SKILL.md +86 -0
- package/skills/pixelcraft-review/references/audit-report.md +69 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +63 -0
- package/skills/pixelcraft-review/references/personas.md +53 -0
- package/skills/pixelcraft-review/references/polish.md +78 -0
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
- package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
- package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
- package/skills/pixelcraft-spatial/SKILL.md +51 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
- package/skills/pixelcraft-spatial/references/platforms.md +147 -0
- package/skills/pixelcraft-tokens/SKILL.md +60 -0
- package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
- package/skills/pixelcraft-tokens/references/adoption.md +55 -0
- package/skills/pixelcraft-tokens/references/format.md +84 -0
- package/skills/pixelcraft-tokens/references/governance.md +80 -0
- package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
- package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
- package/skills/pixelcraft-tui/SKILL.md +76 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +109 -0
- package/skills/pixelcraft-tui/references/ratatui.md +102 -0
- package/skills/pixelcraft-tui/references/rich.md +82 -0
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +108 -0
- package/skills/pixelcraft-ux/SKILL.md +56 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +151 -0
- package/skills/pixelcraft-ux/references/i18n.md +221 -0
- package/skills/pixelcraft-ux/references/laws.md +39 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
- package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
- package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
- package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
- package/skills/pixelcraft-web/SKILL.md +132 -0
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
- package/skills/pixelcraft-web/references/angular.md +108 -0
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +113 -0
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +88 -0
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/elm.md +53 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +220 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +61 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +230 -0
- package/skills/pixelcraft-web/references/qwik.md +94 -0
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +168 -0
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +114 -0
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +111 -0
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +111 -0
- package/skills/pixelcraft-web/references/tailwind.md +99 -0
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-craft
|
|
3
|
+
description: Applies high-craft visual design decisions across platforms. Use when choosing typography, color systems, layout, composition, spacing, motion, imagery, icons, density, or visual hierarchy for any UI surface. Translates a committed direction into concrete typographic scales, OKLCH color roles, grid/rhythm, accessible motion, and imagery/icon rules without assuming a web framework.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pixelcraft craft
|
|
10
|
+
|
|
11
|
+
Craft is controlled decision-making under constraints. Apply the committed direction card and existing project tokens first; do not restyle by default.
|
|
12
|
+
|
|
13
|
+
## References
|
|
14
|
+
|
|
15
|
+
- Read [references/typography.md](references/typography.md) when selecting type (`≤ 2` families + `1` mono), setting `45–75ch` prose measure, enforcing cross-platform tabular numerals (`B6`) and `U+2212` minus, or handling script fallbacks.
|
|
16
|
+
- Read [references/color.md](references/color.md) when building OKLCH ramps, semantic roles, dark-surface `+5–8%` lightness steps & `1px` specular edges (`B4`), vibrancy fallbacks, or checking WCAG + APCA contrast.
|
|
17
|
+
- Read [references/layout.md](references/layout.md) when designing grids, optical icon centroids & concentric corner radii (`B2`), invisible hit-slop, Safe Triangle submenus & slider pointer capture (`B5`), or responsive adaptation.
|
|
18
|
+
- Read [references/layout-quality.md](references/layout-quality.md) before accepting a layout or judging rendered spacing/complexity.
|
|
19
|
+
- Read [references/motion.md](references/motion.md) when calibrating motion by action frequency & warm tooltip chains (`B1`), origin-aware `0.95→1.0` scaling & faster exits (`B3`), damped springs, or reduced-motion paths.
|
|
20
|
+
- Read [references/imagery-icons.md](references/imagery-icons.md) when using photography, illustration, generated media, diagrams, or unified icon systems.
|
|
21
|
+
|
|
22
|
+
## Operating rules
|
|
23
|
+
|
|
24
|
+
1. Translate the direction card into a small set of repeatable decisions. If every component is special, nothing is.
|
|
25
|
+
2. Use semantic roles rather than raw values: surface/ink/accent/state/data; display/body/ui/caption/data type (`≤ 2` font families + `1` mono unless brief-justified; `45–75ch` reading measure); spacing rhythm; motion intent.
|
|
26
|
+
3. Preserve existing project tokens and component conventions unless explicitly asked to redesign them.
|
|
27
|
+
4. Test choices against real content: long and short strings, empty/error/loading states, dark/light themes, text scaling, RTL/script coverage, and the actual input modality.
|
|
28
|
+
5. Let mode control intensity. Operate prioritizes scanability and consistency; Persuade/Experience can carry stronger composition and imagery; Communicate must survive constrained renderers.
|
|
29
|
+
6. Do not use decoration to hide missing hierarchy. Establish position, scale, weight, spacing, and grouping first.
|
|
30
|
+
7. Keep platform translation idiomatic: CSS pixels are not pt/dp/sp/native units; desktop windows are not mobile screens; terminal cells and email clients are not browsers.
|
|
31
|
+
8. Measure a craft choice in its own units: text scaling or terminal cells for hierarchy, actual output/client crop for geometry and color, and input-to-feedback or frame stability for motion. A web corpus range is not a quota for native or exported surfaces.
|
|
32
|
+
|
|
33
|
+
## Studio Invisible Craft (`B1–B6`)
|
|
34
|
+
|
|
35
|
+
| Law | Mandatory micro-craft bar | Reference |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **`B1` Frequency-calibrated motion** | `0–100ms` high-frequency actions (`0ms` key-repeat & warm tooltip chains), `150–220ms` drawers/modals, `300–500ms` non-blocking expressive moments | `references/motion.md` |
|
|
38
|
+
| **`B2` Optical alignment & concentric radii** | `+1–2` unit optical centroid offset on asymmetric glyphs (play, chevron, arrow), concentric radii (`R_outer = R_inner + padding`, clamped `≥ 0`), balanced vertical text padding | `references/layout.md` |
|
|
39
|
+
| **`B3` Origin-aware & asymmetric overlays** | Subtle `0.95 → 1.0` scale anchored to trigger origin (never `0 → 1` center balloon), faster exit (`100–130ms`) than enter (`160–200ms`), non-bouncy springs (`ζ ≥ 0.85`) | `references/motion.md` |
|
|
40
|
+
| **`B4` Dark-surface luminance & edges** | Elevate dark layers via `+5% to +8%` OKLCH `L` steps (never `#000000` drop shadows), `1px` top/inner specular edge (`7–12%` white), lifted/desaturated accents, vibrancy + opaque reduced-transparency fallback | `references/color.md` |
|
|
41
|
+
| **`B5` Forgiving pointer & touch mechanics** | `+6–10` unit invisible hit-slop around compact `24–28` unit icons, Safe Triangle diagonal submenu corridor (or `120–180ms` grace), pointer capture on sliders/splitters + `Shift`/arrow fine-step | `references/layout.md` |
|
|
42
|
+
| **`B6` Tabular numerals & true minus** | Cross-platform tabular figures (`tabular-nums` / `.monospacedDigit()` / `"tnum"` / `FontFeature.tabularFigures()`) on every counter/timer/price/table column + `U+2212` `−` | `references/typography.md` |
|
|
43
|
+
|
|
44
|
+
## Anti-slop craft guard
|
|
45
|
+
|
|
46
|
+
- **No untouched library defaults:** never ship stock framework themes (untouched starter zinc, uncalibrated default purple, stock desktop widget chrome, default sans everywhere without reason) unless the existing project explicitly locks that system.
|
|
47
|
+
- **No decorative clutter:** ban tinted `40×40` rounded-square icon badges on feature cards, universal `rounded-2xl` + heavy drop shadows, card-inside-card nesting, ambient purple-pink mesh gradients, glowing border beams, pulsing hero pills, and decorative entrance animations on every scroll block.
|
|
48
|
+
- Hierarchy comes from scale, weight, measure, contrast, whitespace, and alignment—never extra chrome.
|
|
49
|
+
|
|
50
|
+
## Pre-submit checklist
|
|
51
|
+
|
|
52
|
+
- [ ] First fixation point and 5-second scan path are established by scale, position, spacing, and contrast (`≤ 2` font families + `1` mono; `45–75ch` prose measure).
|
|
53
|
+
- [ ] Exactly one subject-derived signature element carries expression; surrounding chrome and unified icon stroke/corner language stay quiet for the mode.
|
|
54
|
+
- [ ] All color, type, spacing, elevation, and motion decisions map to semantic roles/tokens—zero untouched starter defaults or arbitrary raw-value sprawl.
|
|
55
|
+
- [ ] Invisible Craft `B1–B6` verified: frequency-calibrated timing & warm tooltips, optical icon centroids & concentric radii, trigger-anchored `0.95→1.0` overlays with faster exits, dark `+5–8%` lightness steps & `1px` specular edges, invisible hit-slop + Safe Triangle + pointer capture, and tabular numerals + `U+2212` minus.
|
|
56
|
+
- [ ] Composition, type measure, and density adapt cleanly across narrow, wide, text-scaled (`200%`), RTL, dark/light, reduced-motion, and reduced-transparency states.
|
|
57
|
+
- [ ] Imagery and icons share one coherent system with verified commercial provenance (real, licensed, generated, or visibly marked user-requested placeholder).
|
|
58
|
+
- [ ] Every visual-craft claim is labeled with its actual evidence (`rendered`, `static`, `model-judgment`, or `not-checked`).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Color and palette building
|
|
2
|
+
|
|
3
|
+
Evidence base: perception research, color appearance models, contrast requirements, platform color systems, and mode testing.
|
|
4
|
+
|
|
5
|
+
## Evidence constraints
|
|
6
|
+
|
|
7
|
+
Users form aesthetic judgments extremely quickly, so the first visible field must be intentional before users read details. Colorfulness and perceived visual complexity affect appeal, but peak preferences vary by demographic and culture; there is no universal “premium palette”. Polished visuals can increase perceived usability, but they do not fix actual usability and must never be used as camouflage.
|
|
8
|
+
|
|
9
|
+
## Build process
|
|
10
|
+
|
|
11
|
+
1. Define semantic roles before picking colors: background/surface/raised/sunken/ink/muted/link/focus/accent/on-accent/border/scrim/selection/success/warning/danger/info/data.
|
|
12
|
+
2. Extract color evidence from real content/material: object pigment, light environment, substrate, domain signal, existing brand, cultural context. Do not invent meaning from a trend.
|
|
13
|
+
3. Choose palette posture: restrained, tonal, chromatic, dark atmospheric, print/spot-color, signal/instrument, or dynamic-from-content.
|
|
14
|
+
4. Build perceptual ramps in OKLCH/OKLab, then verify in the output gamut and actual product surfaces.
|
|
15
|
+
5. Validate every state pair and mode; actual contrast is a property of foreground+background+size+weight+state, not a swatch.
|
|
16
|
+
|
|
17
|
+
## Non-default accent strategies
|
|
18
|
+
|
|
19
|
+
| Strategy | Use when | Construction rules | Slop risk |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| restricted palette | strong editorial/systemic direction | one ink, one paper/surface family, one or two semantic accents; invest savings in type/space/material | beige+orange “AI craft” uniform |
|
|
22
|
+
| duotone/monochrome media | archival photography, editorial image systems, print-derived identity | map image shadows/highlights to palette values; preserve enough midtone detail and alt-independent meaning | duotone filter over unrelated stock photography |
|
|
23
|
+
| color-from-content | product/artwork/specimen has real color identity | extract hue families manually/algorithmically, curate rather than average; accent changes only within governed ranges | random image extraction producing inconsistent UI |
|
|
24
|
+
| complementary tension | need one decisive action/signal against a quiet field | use a small high-chroma complement for action; large areas remain low-chroma | equal-area complementary vibration |
|
|
25
|
+
| tonal family + interruption | sophisticated but not sterile | 5–8 steps in one hue family, interrupted by a deliberate material/signal color | corporate blue ramp with one purple gradient |
|
|
26
|
+
| dark atmospheric palette | media/spatial/cinematic surfaces where dark is semantically right | dark is recomputed: low-chroma surfaces, lighter/desaturated accents, layered elevation, controlled scrims; never invert light mode | near-black + neon purple AI default |
|
|
27
|
+
| signal/instrument palette | safety, monitoring, industrial, scientific domains | hue allocation follows domain standards and severity; saturation reserved for abnormal/critical states | decorative red/green status without labels |
|
|
28
|
+
| spot-color print logic | publishing/culture/identity-led work | treat accent like a print spot ink: limited count, consistent role, flat use, registration/texture optional | fake risograph noise over conventional SaaS layout |
|
|
29
|
+
|
|
30
|
+
## OKLCH ramp method
|
|
31
|
+
|
|
32
|
+
- Pick the hue(s) from evidence; do not spin the hue wheel randomly.
|
|
33
|
+
- Choose chroma where the hue is strongest, then lower chroma toward very light/dark endpoints to reduce gamut clipping and harshness.
|
|
34
|
+
- Keep semantic positions stable: `accent-500` means the same relative emphasis across themes even if values differ.
|
|
35
|
+
- Check actual sRGB/P3 output; out-of-gamut colors must be intentionally mapped/clamped.
|
|
36
|
+
- Use hue rotation across ramps only when it encodes material behavior (heat, depth, light); otherwise coherence matters more.
|
|
37
|
+
- Do not assume equal OKLCH lightness means equal contrast. Measure actual pairs; use APCA as supplemental perceptual guidance while conforming to WCAG 2.2 requirements.
|
|
38
|
+
|
|
39
|
+
Illustrative shape only—not a reusable palette:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
surface-0 L .98 C .01 / surface-1 L .94 C .02 / ink L .24 C .03
|
|
43
|
+
accent core L .58 C .16 / hover L .52 C .17 / soft-fill L .91 C .05
|
|
44
|
+
dark surface L .20 C .02 / dark raised L .26 C .025 / dark accent L .72 C .11
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## B4 — Dark-surface luminance elevation, specular edges & vibrancy
|
|
48
|
+
|
|
49
|
+
Never build dark mode by mechanically inverting light tokens or dropping `#000000` shadows onto dark cards (black drop shadows vanish on dark surfaces or muddy surrounding pixels):
|
|
50
|
+
|
|
51
|
+
| Rule | Concrete specification | Cross-platform idioms |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| **Luminance-stepped elevation (`+5% to +8%` OKLCH `L`)** | Elevate higher z-layers by stepping surface lightness upward in **`+0.05` to `+0.08` OKLCH `L` increments** (e.g., base canvas `L ≈ 0.14–0.17` → raised card/sidebar `L ≈ 0.20–0.23` → floating popover/dialog `L ≈ 0.26–0.31`). Reserve pure `#000000` (`L = 0`) for OLED wearable/battery-saver modes, high-contrast accessibility themes, or explicit brief direction. | CSS `oklch()` surface tokens (`surface-0`, `surface-1`, `surface-2`); SwiftUI elevated `Color` asset variants; Compose tonal/luminance surface ramp; Flutter `ColorScheme` surface containers |
|
|
54
|
+
| **`1px` subtle top/inner specular edge** | Separate stacked dark cards, modals, and command palettes with a **`1px` top or inner rim highlight** at **`rgba(255, 255, 255, 0.07–0.12)`** (`oklch(1 0 0 / 8%–12%)`) instead of heavy outer shadows. | **Web:** `box-shadow: inset 0 1px 0 oklch(1 0 0 / 10%)` + `1px solid oklch(1 0 0 / 8%)`<br>**SwiftUI:** `.overlay(RoundedRectangle(...).strokeBorder(LinearGradient(...)))`<br>**Compose / Flutter:** `Modifier.border(1.dp, Brush.verticalGradient(...))` |
|
|
55
|
+
| **Desaturated & lifted semantic accents** | Pull chroma down slightly and lift lightness on status/accent fills and foregrounds in dark mode so saturated reds, blues, and greens do not vibrate or halate against dark backgrounds. | Test focus, selection, caret, placeholder, disabled, pressed, visited, chart grid, and error text independently in both modes (`WCAG 2.2 AA` + `APCA |Lc|`) |
|
|
56
|
+
| **Vibrancy saturation boost + opaque fallback** | Plain Gaussian blur over dark/colorful content looks muddy gray; pair blur with **`160–180%` saturation boost** or native OS vibrancy, and switch to a **solid opaque raised surface** under Reduced Transparency. | **Web:** `backdrop-filter: blur(16px) saturate(170%)` + `@media (prefers-reduced-transparency: reduce)` solid fallback<br>**Apple / Windows / Android:** `NSVisualEffectView`, `.ultraThinMaterial` (`accessibilityReduceTransparency`), Windows `Mica`/`Acrylic`, Android `RenderEffect` |
|
|
57
|
+
|
|
58
|
+
Honor `prefers-contrast`, `forced-colors`, and platform high-contrast modes; never strip system-controlled boundaries.
|
|
59
|
+
|
|
60
|
+
### CSS Color 5, wide-gamut P3, and `forced-colors` idioms
|
|
61
|
+
|
|
62
|
+
On modern web surfaces, derive state colors and modes systematically while keeping sRGB and Windows High Contrast (`forced-colors`) intact:
|
|
63
|
+
|
|
64
|
+
```css
|
|
65
|
+
:root {
|
|
66
|
+
color-scheme: light dark;
|
|
67
|
+
--accent: oklch(0.56 0.16 245);
|
|
68
|
+
/* Light/dark semantic pairing without duplicated media-query blocks */
|
|
69
|
+
--surface: light-dark(oklch(0.98 0.008 90), oklch(0.19 0.015 250));
|
|
70
|
+
--ink: light-dark(oklch(0.22 0.015 250), oklch(0.93 0.01 90));
|
|
71
|
+
/* Perceptual hover/tint states via CSS Color 5 color-mix() and relative color syntax */
|
|
72
|
+
--accent-hover: oklch(from var(--accent) calc(l - 0.07) c h);
|
|
73
|
+
--accent-soft: color-mix(in oklch, var(--accent) 14%, var(--surface));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Progressive wide-gamut Display P3 chroma boost when hardware supports it */
|
|
77
|
+
@media (color-gamut: p3) {
|
|
78
|
+
:root {
|
|
79
|
+
--accent: oklch(0.58 0.22 245);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Forced Colors / Windows High Contrast: preserve boundaries via transparent borders & system colors */
|
|
84
|
+
.button,
|
|
85
|
+
.panel {
|
|
86
|
+
border: 1px solid transparent; /* invisible on normal displays; rendered in ButtonBorder under forced-colors */
|
|
87
|
+
}
|
|
88
|
+
@media (forced-colors: active) {
|
|
89
|
+
.button:focus-visible {
|
|
90
|
+
outline: 2px solid Highlight;
|
|
91
|
+
outline-offset: 2px;
|
|
92
|
+
}
|
|
93
|
+
.status-dot {
|
|
94
|
+
forced-color-adjust: none; /* opt out ONLY when a swatch carries semantic status paired with text */
|
|
95
|
+
border: 1px solid CanvasText;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Perceptual contrast (APCA) and dark-mode halation
|
|
101
|
+
|
|
102
|
+
WCAG 2.2 luminance ratios (`4.5:1` / `3:1`) remain the mandatory legal/accessibility floor, but they ignore polarity and font weight—creating **dark-mode false passes** where gray text on dark surfaces passes `4.5:1` mathematically yet dissolves visually from halation. Pair WCAG 2.2 AA with **APCA Lightness Contrast (`|Lc|`)** checks tied to font size and weight:
|
|
103
|
+
|
|
104
|
+
| Role | Typical size & weight | Supplemental APCA target | Notes |
|
|
105
|
+
|---|---|---|---|
|
|
106
|
+
| Regular body copy | `16px`, weight `400` | `|Lc| ≥ 75` | Push dark-mode body tokens lighter than light-mode inversions |
|
|
107
|
+
| Bold body / lead | `16px`, weight `700` | `|Lc| ≥ 60` | Lower threshold only when weight/size increases together |
|
|
108
|
+
| Subheadings / UI labels | `18–24px`, weight `600–700` | `|Lc| ≥ 45` | Never drop muted labels below WCAG AA + readable `Lc` |
|
|
109
|
+
| Large display / non-text icons | `36px+` bold or icons/borders | `|Lc| ≥ 30`–`45` | Verify final composited pixels including ancestor opacity |
|
|
110
|
+
|
|
111
|
+
## Cultural and content checks
|
|
112
|
+
|
|
113
|
+
Color meanings are locale/domain dependent. Validate finance gain/loss, mourning/celebration, politics/religion, safety, and brand-category conventions for target markets. Never encode meaning by hue alone; pair color with icon/text/pattern/position. For data: categorical palettes need direct labels and limited categories, sequential scales need monotonic lightness, and diverging scales need a meaningful neutral midpoint.
|
|
114
|
+
|
|
115
|
+
## Palette rejection test
|
|
116
|
+
|
|
117
|
+
Reject the palette if removing the subject makes the same choices equally plausible for a bank, game, clinic, and AI chatbot. Also reject it if the only novelty is hue: composition, type, material, and motion must participate in the direction.
|
|
118
|
+
|
|
119
|
+
## Rendered palette inventory
|
|
120
|
+
|
|
121
|
+
After rendering, inventory quantized background and ink colors weighted by visible area. Separate intentional semantic colors from image pixels, antialiasing noise, shadows, charts, media, and third-party content. In the live corpus the median rendered inventory contained approximately **6–7 distinct quantized color groups**, with the upper quartile near **9**; light and dark surfaces were both common. Treat this only as calibration for how restrained strong work can remain despite rich media.
|
|
122
|
+
|
|
123
|
+
Record palette posture numerically in the direction card: base surface count, ink levels, semantic accent count, state/data colors, exceptions, and mode-specific substitutions. A typical restrained posture is one background family, one ink family, and one or two semantic accents—focused product and developer-tool surfaces often hold to **2–4 active color groups** in the initial viewport—though subject matter may justify more. Reject accent proliferation when each addition does not have a semantic role, state pair, contrast evidence, and token owner.
|
|
124
|
+
|
|
125
|
+
Audit muted and translucent inks explicitly: secondary labels, timestamps, placeholders, and reduced-opacity captions are the most common real-world contrast failures even on otherwise high-contrast pages. Always verify final composited contrast (including element and ancestor `opacity`) in both light and dark modes.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Imagery and icons
|
|
2
|
+
|
|
3
|
+
## Imagery
|
|
4
|
+
|
|
5
|
+
- Inventory real assets first: product photography, screenshots, diagrams, user-supplied images, archival material, licensed stock, generated media, or none.
|
|
6
|
+
- Never fabricate logos, customer imagery, product capabilities, screenshots, testimonials, or documentary evidence.
|
|
7
|
+
- Choose crop/aspect ratio from meaning, not convenience. Preserve subject recognition at actual rendered sizes.
|
|
8
|
+
- Art-direct generated imagery: subject, lens/framing, light, material, palette constraints, negative space, aspect, text policy, exclusion list. Inspect output for artifacts and pseudo-text.
|
|
9
|
+
- Diagrams and data visuals must use real data/labels or visibly marked placeholders approved by the brief.
|
|
10
|
+
- Provide meaningful alternative text or mark imagery decorative according to platform practice.
|
|
11
|
+
- Optimize dimensions/format/loading priority; reserve space to prevent layout shift.
|
|
12
|
+
- Account for localization and cultural context: gestures, clothing, symbols, maps, flags, food, skin representation, religious material, and color meaning are not neutral.
|
|
13
|
+
|
|
14
|
+
## Iconography
|
|
15
|
+
|
|
16
|
+
Define one system before drawing or selecting icons:
|
|
17
|
+
|
|
18
|
+
| Decision | Rule |
|
|
19
|
+
|---|---|
|
|
20
|
+
| metaphor family | object/action metaphors users already know; avoid invented abstractions |
|
|
21
|
+
| geometry | stroke/fill, corner radius, grid, optical size, terminal weight |
|
|
22
|
+
| semantic inventory | one meaning per icon; one icon per meaning |
|
|
23
|
+
| sizing | align optical center and visual mass rather than bounding boxes only |
|
|
24
|
+
| state | default/active/selected/disabled/error behavior |
|
|
25
|
+
| accessibility | accessible name when interactive/informative; hidden only when truly decorative |
|
|
26
|
+
|
|
27
|
+
Rules:
|
|
28
|
+
|
|
29
|
+
- Do not use emoji as structural icons or sole critical meaning. Emoji rendering varies culturally and across platforms.
|
|
30
|
+
- Do not mix outline, filled, 3D, emoji, and illustration styles without a deliberate editorial reason.
|
|
31
|
+
- Never iconify every label because the layout feels empty. Text is often clearer.
|
|
32
|
+
- Use directionally neutral icons or mirror only semantically directional symbols in RTL.
|
|
33
|
+
- In terminal/email/game contexts verify raster/vector/color support and fallback glyphs.
|
|
34
|
+
|
|
35
|
+
## Signature imagery
|
|
36
|
+
|
|
37
|
+
A memorable visual should arise from subject material: cross-section of the product, archive artifacts, real workflow state, local visual vernacular, measurement texture, or data topology. Generic blobs, planets, gradients, wireframe globes, and smiling abstract people are not signatures.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Layout quality inspection
|
|
2
|
+
|
|
3
|
+
Use this reference after choosing a composition and again on rendered output. It converts layout critique from vague taste into observable checks. Do not use scores as proof of beauty; use them to find defects and explain trade-offs.
|
|
4
|
+
|
|
5
|
+
## Mode-dependent complexity budget
|
|
6
|
+
|
|
7
|
+
| Mode | Default complexity posture | Warning signs |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Operate | low-to-medium density, high grouping discipline, familiar scanning structure | competing accents, ungrouped dense controls, decorative fragments near primary work |
|
|
10
|
+
| Read | low clutter, long-line control, strong vertical rhythm | dense side noise, interrupted measure, excessive cards/rules |
|
|
11
|
+
| Persuade | medium complexity with one controlled focal spectacle | several hero effects at once, feature clutter, decorative copy |
|
|
12
|
+
| Experience/Play | higher sensory complexity allowed when orientation and floor survive | unreadable HUD/navigation, uncontrolled motion/contour noise |
|
|
13
|
+
| Communicate | lowest renderer-dependent complexity | background interference, fragile alignment, ink/data waste |
|
|
14
|
+
| Constrained/game/spatial | complexity budgeted by distance, input speed, and safety | tiny targets, focal rivalry, occlusion, glance failure |
|
|
15
|
+
|
|
16
|
+
Complexity is not a moral quality. Dense expert tooling can be correct; sparse marketing can still be empty. Judge whether grouping and focal control make the complexity legible.
|
|
17
|
+
|
|
18
|
+
## Static inspection checklist
|
|
19
|
+
|
|
20
|
+
| Dimension | Pass condition | Defect examples |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| focal path | first/second/third visual priority can be named without hesitation | everything bold/large/accented; primary action visually weaker than decoration |
|
|
23
|
+
| alignment | repeated edges/centerlines/baselines are intentional; deviations have purpose | near-alignment drift, accidental 1–3px mismatches, orphan controls |
|
|
24
|
+
| grouping | related items share proximity/containment; unrelated groups have clear separation | equal spacing everywhere, wrong grouping by proximity, boxed noise |
|
|
25
|
+
| density | density varies deliberately by importance/mode | uniform compaction or uniform whitespace with no information hierarchy |
|
|
26
|
+
| balance | visual weight feels stable without requiring symmetry | heavy media cluster unsupported by structure, accidental empty quadrant |
|
|
27
|
+
| contour clutter | edges, borders, shadows, icons, and chart marks do not compete | every atom carded, nested outlines, decorative grid behind dense data |
|
|
28
|
+
| measure/rhythm | spacing scale and text rhythm survive real content | magic numbers per component, broken baseline/measure after localization |
|
|
29
|
+
| focal area | primary content/action lies in expected scan/input region for modality | key control stranded below fold/safe area/overscan without reason |
|
|
30
|
+
| responsive integrity | narrowing reorders/restructures rather than merely shrinking | side-by-side squeeze, clipped labels, hidden priority actions |
|
|
31
|
+
| orientation | user can tell location, progress, and escape route | immersive layout with no context, missing back/navigation state |
|
|
32
|
+
|
|
33
|
+
## Rendered inspection procedure
|
|
34
|
+
|
|
35
|
+
1. Inspect the smallest supported viewport first; then typical and wide sizes.
|
|
36
|
+
2. Squint/blur mentally or zoom out: identify the first focal object and whether it matches intent.
|
|
37
|
+
3. Trace the visual path using actual content order, not placeholder-perfect content.
|
|
38
|
+
4. Count visible accents/borders/containers in the primary region. If the count cannot be justified, remove visual noise before adding emphasis.
|
|
39
|
+
5. Measure or inspect repeated edges: card/container alignment, text baselines, icon centers, split boundaries, sticky regions.
|
|
40
|
+
6. Resize through breakpoints rather than jumping only between canned screenshots.
|
|
41
|
+
7. Test text expansion/contraction, RTL mirroring, long data, empty data, and missing media.
|
|
42
|
+
8. Record defects by region and severity; do not report “spacing feels off” without an observable example.
|
|
43
|
+
|
|
44
|
+
## Layout repair order
|
|
45
|
+
|
|
46
|
+
1. restore task access, clipping, overflow, keyboard/focus visibility, and orientation;
|
|
47
|
+
2. correct grouping/hierarchy before changing decoration;
|
|
48
|
+
3. remove duplicate containment/borders/accents;
|
|
49
|
+
4. repair rhythm and alignment using semantic spacing/layout constraints;
|
|
50
|
+
5. adjust optical balance only after structural defects are fixed;
|
|
51
|
+
6. re-render the affected breakpoint/state, not the entire matrix by default.
|
|
52
|
+
|
|
53
|
+
## Hard warnings
|
|
54
|
+
|
|
55
|
+
- Do not equate whitespace with quality; unused space can be as defective as clutter.
|
|
56
|
+
- Do not equate density with expertise; expert users need grouping and predictability, not noise.
|
|
57
|
+
- Do not break learned operational patterns merely to look distinctive.
|
|
58
|
+
- Do not optimize one static breakpoint while destroying resize/reflow behavior.
|
|
59
|
+
- Do not use overlay text on busy imagery unless contrast and reading priority remain measurable in the real asset.
|
|
60
|
+
|
|
61
|
+
## Measurable geometry inventory
|
|
62
|
+
|
|
63
|
+
When rendered evidence is available, measure rather than guess: estimated uncovered viewport ratio, content centroid/asymmetry, repeated overlap count, maximum content width, visible grid count, and resize behavior. In the live corpus the estimated whitespace median was approximately **0.57** with a middle half around **0.42–0.68**; obvious content-center deviation appeared in roughly **18%** of pages, while some positive overlap appeared in roughly **76%** because heroes, cards, media, and sticky controls overlap intentionally. Median maximum content width was approximately **784 px**, with an upper quartile around **1073 px** at a 1440 px viewport.
|
|
64
|
+
|
|
65
|
+
These measurements are not targets. High whitespace can mean emptiness; low whitespace can mean density done well; overlap can be intentional layering or a defect. Calibrate interpretation by mode: dense Operate surfaces, editorial Read surfaces, and expressive Persuade scenes should not share one whitespace expectation. Use numbers to locate regions for inspection and compare before/after states. Full-bleed media is an explicit exception, while body text and operational controls need deliberate measure constraints.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Layout and composition
|
|
2
|
+
|
|
3
|
+
## Composition before components
|
|
4
|
+
|
|
5
|
+
- Choose the primary scan path: Z/F pattern, editorial column, instrument cluster, object-led spatial composition, timeline, index, or task-first workspace.
|
|
6
|
+
- Use asymmetry deliberately: unequal columns, anchored negative space, diagonal/orthogonal tension, or alignment interruption. Do not center everything by default.
|
|
7
|
+
- Establish one dominant element per viewport/screen region. Supporting elements need quieter scale, contrast, and motion.
|
|
8
|
+
- Equal left/right content edges are often more important than identical internal column widths.
|
|
9
|
+
- Cards are one containment tool, not a page structure. Consider tables, lists, editorial columns, comparison matrices, timelines, canvases, toolbars, inspectors, and spatial regions.
|
|
10
|
+
|
|
11
|
+
## Grids and rhythm
|
|
12
|
+
|
|
13
|
+
- Define a small spacing base (commonly 4 or 8 in screen UI) and semantic multipliers; dense expert tools may use a smaller rhythm but need stronger alignment discipline.
|
|
14
|
+
- Use consistent optical alignment, not merely numeric alignment. Correct for icon mass, uppercase height, hanging punctuation, and image crop.
|
|
15
|
+
- Dense Operate UI: prioritize scanlines, aligned values, persistent controls, predictable row heights, and visible state.
|
|
16
|
+
- Persuade/Read: vary pacing deliberately across sections; repetition without rhythm creates monotony.
|
|
17
|
+
- Do not let grid lines become decoration. Grids should control placement, measurement, or orientation.
|
|
18
|
+
|
|
19
|
+
## Density by mode
|
|
20
|
+
|
|
21
|
+
| Mode | Density posture | Key risk |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Persuade | lower density, strong pacing | empty generic hero without substance |
|
|
24
|
+
| Operate | medium/high density, stable scanlines | decorative spacing hides data/actions |
|
|
25
|
+
| Read | measure-controlled medium density | long lines, weak paragraph rhythm |
|
|
26
|
+
| Experience | variable density by scene | disorientation without navigation feedback |
|
|
27
|
+
| Play | scene-dependent, HUD clarity | effects obscure critical state |
|
|
28
|
+
| Communicate | conservative density | client rendering destroys layout |
|
|
29
|
+
|
|
30
|
+
## Adaptation
|
|
31
|
+
|
|
32
|
+
- Restructure at breakpoints/size classes; do not simply scale desktop down.
|
|
33
|
+
- Decide what becomes navigation, disclosure, secondary pane, or sequence at narrow widths.
|
|
34
|
+
- Compare the same task across size and input classes: a wide comparison table may become aligned summaries with detail on touch, and a persistent sidebar may become reachable disclosure or navigation. Keep comparable facts and destinations reachable; prefer the same semantic structure when it already works.
|
|
35
|
+
- Preserve primary action visibility without covering content with sticky chrome.
|
|
36
|
+
- Test landscape/portrait, split window, dynamic text, RTL mirroring, safe area, virtual keyboard, controller focus order, and minimum terminal size as applicable.
|
|
37
|
+
- Horizontal scrolling can be correct for data tables/timelines, but never accidental page overflow.
|
|
38
|
+
|
|
39
|
+
## Modern CSS layout primitives
|
|
40
|
+
|
|
41
|
+
Prefer native CSS layout primitives over JS resize observers or hardcoded breakpoint duplication when targeting modern browsers:
|
|
42
|
+
|
|
43
|
+
| Primitive | Use for | Concrete idiom / guardrail |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| **Container Queries** (`@container`, `cqi`/`cqb`, style queries) | Component-level layout restructuring inside sidebars, split panes, and multi-column grids independent of viewport width | Declare `container-type: inline-size` on wrappers; size type/padding fluidly with `cqi`/`cqb`; use `@container style(--density: compact)` for token-driven density shifts |
|
|
46
|
+
| **CSS Subgrid** (`grid-template-rows: subgrid` / `columns: subgrid`) | Aligning internal headings, metadata rows, and footers across sibling grid items without rigid fixed heights | Inherit parent tracks so multi-line localized titles stay baseline-aligned across rows |
|
|
47
|
+
| **CSS Anchor Positioning** (`anchor-name`, `position-anchor`, `position-area`, `position-try-fallbacks`) | Tooltips, popovers, and menus tethered to triggers with automatic viewport collision flipping | Pair with Popover API; include `position-try-fallbacks: flip-block, flip-inline` and feature-detect (`@supports (anchor-name: --a)`) with fallback positioning for older browsers |
|
|
48
|
+
| **Dynamic viewport units** (`svh`, `dvh`, `lvh`) | Full-height mobile shells, sticky composers, and hero frames with collapsible mobile browser toolbars | Use `svh` for stable initial-paint heights that must not jump as toolbars retract; reserve `dvh` for active interactive workspaces (e.g., chat input bars) where real-time bottom-edge fit matters; avoid `100vh` on mobile |
|
|
49
|
+
| **Intrinsic sizing animation** (`interpolate-size: allow-keywords` / `calc-size()`) | Smooth disclosure, accordion, and `<details>` height transitions to/from `auto` without measuring `scrollHeight` in JS | Opt in via `interpolate-size: allow-keywords` (or `calc-size(auto, size)`) and gate motion under `prefers-reduced-motion` |
|
|
50
|
+
|
|
51
|
+
## B2 — Optical alignment, concentric geometry & text-box balance
|
|
52
|
+
|
|
53
|
+
Numeric bounding-box math produces subtly crooked interfaces; align by optical mass and curvature:
|
|
54
|
+
|
|
55
|
+
| Law | Defect when ignored | Concrete rule & cross-platform idiom |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| **Asymmetric icon centroid offset** | Play triangles (`▶`), chevrons (`›`/`‹`), back/forward arrows, and paper-plane send glyphs centered by bounding box look pushed away from their tip inside circular/square buttons | Shift glyph **`+1–2` units (`px`/`pt`/`dp`) toward its visual center of mass** (e.g., play triangle nudged `+1.5px` inline-end inside a circular button) or author optical padding directly inside the `24×24` icon frame |
|
|
58
|
+
| **Concentric corner radii** | Giving nested cards and inner media/buttons the exact same border radius (`16px` inside `16px`) creates pinched, lumpy corner walls | Enforce **`R_outer = R_inner + padding`** (`R_inner = max(0, R_outer - padding)`). Clamp `R_inner` to `0` when `padding >= R_outer`. Use CSS `calc(var(--r-outer) - var(--pad))`, SwiftUI `ConcentricRectangle` / container-relative shapes, or tokenized inner/outer radius pairs |
|
|
59
|
+
| **Optical vertical text balance** | Font em-boxes reserve descender space below the alphabetic baseline, making symmetric top/bottom padding look bottom-heavy on buttons, pills, and single-line headers | Trim or compensate vertical metrics: CSS `text-box-trim: trim-both; text-box-edge: cap alphabetic`, Compose/SwiftUI/Qt `FirstBaseline` alignment, or `-1` to `-2` unit bottom padding compensation where trim APIs are unavailable |
|
|
60
|
+
|
|
61
|
+
## B5 — Forgiving pointer, invisible hit-slop, Safe Triangle & pointer capture
|
|
62
|
+
|
|
63
|
+
Decouple compact visual density from physical pointer/touch ergonomics so fast movement never mis-fires:
|
|
64
|
+
|
|
65
|
+
| Mechanism | Required behavior | Cross-platform idioms |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| **Invisible hit-slop expansion** | Compact `24–28` unit icon controls (`px`/`pt`/`dp`) keep crisp visual bounds while expanding their interactive hit box by **`+6–10` units per side** (meeting `≥ 40–48` unit comfort targets without colliding with neighbors) | **Web:** `position: relative` + `::before { content: ""; position: absolute; inset: -8px; }`<br>**SwiftUI / UIKit:** `.padding(8).contentShape(Rectangle())` or override `point(inside:with:)`<br>**Android / Compose:** `TouchDelegate` or `Modifier.minimumInteractiveComponentSize()`<br>**Flutter / Desktop / Game:** `HitTestBehavior.translucent` padded box, Qt hit-margin, or expanded HUD rect |
|
|
68
|
+
| **Safe Triangle submenu corridor** | Cascading hover submenus, flyouts, and megamenus must survive diagonal cursor travel from trigger row to child pane without collapsing across sibling items | Compute a dynamic **Safe Triangle** from cursor exit `(x, y)` to the open submenu's near top and bottom corners (or hold a `120–180ms` directional-intent grace timer while pointer moves toward the submenu); always preserve click/Enter/Arrow keyboard parity |
|
|
69
|
+
| **Slider, scrubber & splitter pointer capture** | Dragging a timeline scrubber, range slider, color Loupe, or pane splitter continues smoothly until release even when the pointer drifts outside the narrow track | **Web:** call `el.setPointerCapture(e.pointerId)` on `pointerdown` and release on `pointerup`/`pointercancel`<br>**SwiftUI / Compose / Flutter:** `DragGesture` / `pointerInput { detectDragGestures }` continuous capture<br>**Desktop / Game:** Qt `grabMouse()`, Win32/XAML `CapturePointer` + **`Escape` cancel** + **`Shift`/Arrow fine-stepping** |
|
|
70
|
+
|
|
71
|
+
## Hierarchy checks
|
|
72
|
+
|
|
73
|
+
Squint test: primary/secondary/tertiary grouping should remain visible when detail blurs. Remove one visual property at a time; if hierarchy disappears only when color is removed, color-only dependence is likely. Compare real content lengths rather than lorem ipsum symmetry.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Motion and interaction
|
|
2
|
+
|
|
3
|
+
Evidence base: usability research, platform motion/accessibility guidance, rendering-performance constraints, and the accessibility floor.
|
|
4
|
+
|
|
5
|
+
## Purpose before spectacle
|
|
6
|
+
|
|
7
|
+
Motion earns its cost only when it acknowledges input, shows causality, preserves orientation, communicates progress/state, or creates the direction's single signature moment. Apple gives the same constraint: purposeful, brief, precise, optional motion—not motion for its own sake. Showcase spectacle is not permission to sacrifice usability; celebrated interfaces are still wrong when motion blocks comprehension, control, or access.
|
|
8
|
+
|
|
9
|
+
## B1 — Frequency-calibrated motion & warm tooltip chains
|
|
10
|
+
|
|
11
|
+
Calibrate animation duration inversely to daily action frequency—high-repetition controls must never pay ceremonial animation tax:
|
|
12
|
+
|
|
13
|
+
| Frequency tier | Typical interactions | Duration budget | Required behavior |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| **High frequency** (`50–100+×/day`) | command palettes, context/dropdown menus, tab/row/cell selection, keyboard list traversal, warm tooltips | **`0–100ms`** (`0ms` on key-repeat / TUI cell step) | Instant acknowledgment; zero stagger or decorative entrance delay; hold-key repeat runs at `0ms` |
|
|
16
|
+
| **Warm tooltip chain** | sweeping pointer/focus across sibling toolbar icons or table headers | `300–500ms` cold open (`~100ms` fade) → **`0ms` delay & `0ms` fade** while warm | Once one tooltip in a group opens, sibling tooltips open immediately with zero fade until pointer leaves the group (`~300–400ms` cooldown) |
|
|
17
|
+
| **Medium frequency** (`5–30×/day`) | drawers, side sheets, modal dialogs, inspector panes, accordion disclosures | **`150–220ms`** | Snappy deceleration or critically damped spring; retargetable mid-flight without queuing |
|
|
18
|
+
| **Low frequency / expressive** (`≤ 1–3×/session`) | first-run onboarding, signature hero reveal, milestone confirmation | **`300–500ms`** | Never block pointer, scroll, or keyboard input; user can click or navigate through immediately |
|
|
19
|
+
| **Rendering & concurrency** | all interactive and choreographed layers | compositor-only (`transform`, `opacity`) | Normally 1 primary + at most 2 supporting motions; ban `transition: all`, layout/paint thrashing, and idle loops in Operate/Read |
|
|
20
|
+
|
|
21
|
+
Tokenize semantic durations and physics (`motion.instant`, `motion.fast`, `motion.panel.enter`, `motion.panel.exit`, `motion.spring.operational`) rather than scattering raw milliseconds.
|
|
22
|
+
|
|
23
|
+
## B3 — Origin-aware scaling, asymmetric open/close & damped springs
|
|
24
|
+
|
|
25
|
+
Overlays and interactive surfaces must preserve spatial causality and dismiss without drag:
|
|
26
|
+
|
|
27
|
+
1. **Subtle trigger-anchored scale (`0.95 → 1.0`, never `0 → 1` center balloon):** popovers, context menus, combobox lists, and contextual sheets enter from **`scale(0.95)`–`scale(0.97)` to `1.0`** paired with opacity, anchored to the trigger's attachment corner or edge—never zooming from `0` or expanding from viewport center when opened by a corner button.
|
|
28
|
+
2. **Asymmetric enter vs exit duration:** closing transitions run **faster than opening (`~100–130ms` exit vs `~160–200ms` enter)** using a brisk exit curve (`ease-in` or tight spring) so dismissing menus, modals, and sheets gets out of the user's way immediately.
|
|
29
|
+
3. **Velocity-preserving, non-rubbery operational springs (`ζ ≥ 0.85`):** gesture-driven sheets, swipeable cards, and pan-to-dismiss overlays inherit release velocity via spring physics without cartoonish overshoot (damping ratio `ζ ≥ 0.85`—critically or near-critically damped—in Operate/Read UI; degrade to brief opacity crossfades under Reduced Motion).
|
|
30
|
+
|
|
31
|
+
| Platform | Trigger-origin anchor idiom | Asymmetric timing / operational spring (`ζ ≥ 0.85`) |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| **Web CSS / Popover** | `transform-origin: var(--popover-origin, top start)` (or CSS Anchor Positioning edge) + `scale(0.96)` | Enter `180ms` `ease-out` / spring `linear()`; exit `115ms` `ease-in` |
|
|
34
|
+
| **SwiftUI / AppKit** | `.popover(attachmentAnchor: .rect(.bounds))` or `.scaleEffect(open ? 1 : 0.96, anchor: .topLeading)` | `.spring(duration: 0.2, bounce: 0.0)` (enter) / `.easeIn(duration: 0.12)` (exit) |
|
|
35
|
+
| **Jetpack Compose** | `scaleIn(initialScale = 0.95f, transformOrigin = TransformOrigin(0f, 0f))` | `tween(180, FastOutSlowInEasing)` enter / `tween(115, FastOutLinearInEasing)` exit; `Spring.DampingRatioNoBouncy` |
|
|
36
|
+
| **Flutter** | `ScaleTransition` / `Transform.scale` with `alignment: AlignmentDirectional.topStart` | `SpringDescription.withDampingRatio(mass: 1, stiffness: 500, ratio: 0.9)` or `duration: 180ms` / `reverseDuration: 115ms` |
|
|
37
|
+
| **Desktop / Game UI** | Anchor popup rect to widget `mapToGlobal` trigger edge (Qt/WinUI/Slint/UMG); scale `0.96 → 1.0` | `160–180ms` enter, `100–120ms` exit; instant `0ms` in TUI |
|
|
38
|
+
|
|
39
|
+
## Concentric geometry and translucent materials
|
|
40
|
+
|
|
41
|
+
- **Concentric corner radii** (see `references/layout.md` `B2`): when nesting rounded containers, compute `innerRadius = max(0, outerRadius - padding)` so nested borders stay optically parallel instead of pinching at corners.
|
|
42
|
+
- **Refractive / glass surfaces** (see `references/color.md` `B4`): pair translucent blur with saturation boost (`saturate(160–180%)` / native OS vibrancy) and provide a solid high-contrast fallback under `@media (prefers-reduced-transparency: reduce)` and platform Reduce Transparency settings:
|
|
43
|
+
|
|
44
|
+
```css
|
|
45
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
46
|
+
.glass-surface {
|
|
47
|
+
backdrop-filter: none;
|
|
48
|
+
background-color: var(--semantic-color-surface-raised);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Technique library
|
|
54
|
+
|
|
55
|
+
| Technique | Use when | Web implementation | Native/mobile equivalent | Reduced/fallback path | Cliché risk |
|
|
56
|
+
|---|---|---|---|---|---|
|
|
57
|
+
| scroll-driven reveal/progress | progress itself is spatial/temporal: drawing a route, filling a meter, comparing before/after | CSS scroll-driven animations or small observer-driven transform/opacity; no input hijacking | scroll-linked offset/phase in SwiftUI/Compose/Flutter | static final state or chapter thumbnails; progress readable without motion | every section fading/sliding upward becomes meaningless decoration |
|
|
58
|
+
| pinned/sticky narrative | one artifact needs persistent context while chapters annotate it | sticky media pane + normal document flow; sparse keyed state changes | split pane or top preview + pageable chapters | linear static layout with all annotations visible | scrolljacked full-screen scenes that trap the user |
|
|
59
|
+
| View Transitions/shared element | object identity continues across route/state | same-document `startViewTransition` or cross-document opt-in; name only meaningful shared elements | native shared-element/container transform transitions | instant navigation; preserve focus and announce route change | morphing everything because the API exists |
|
|
60
|
+
| cursor/hover response | pointer precision adds inspection, magnetic affordance, or localized reveal | transform/opacity near cursor; keyboard focus receives equivalent state | touch/long-press/context menu or focus ring equivalents | static emphasis; no hover-only disclosure | custom cursor replacing the system cursor without value |
|
|
61
|
+
| text reveal | short editorial headlines where sequencing creates voice | per-line or per-phrase mask/translate once; keep text selectable and semantically whole | attributed text/line-level fade or no-op | all words visible instantly | letter-by-letter spectacle on long/localized copy |
|
|
62
|
+
| page transition | spatial continuity or scene change is real | View Transition or brief opacity/transform; keep browser navigation expectations | platform navigation transition/spring | instant transition | ceremonial transitions that delay every task |
|
|
63
|
+
| micro-interaction | state needs confirmation or physical cause | pressed scale/color/token state within 100ms; no layout shift | haptics/platform touch feedback plus visual state | static state/icon/color change | bouncy jelly controls on serious operations |
|
|
64
|
+
| WebGL/shader accent | material/light/data inherently spatial or generative | one bounded canvas/scene; pause offscreen; static poster; GPU/memory budget | Metal/Vulkan/OpenGL/native scene only at signature surface | high-quality static image/canvas fallback | default orb/fluid/aurora background |
|
|
65
|
+
| kinetic type/marquee | ticker/log/scoreboard semantics or deliberate print/poster voice | transform-only loop, pause on hover/focus, duplicate content accessibly | ticker view with reduced speed/control | static wrapped text | meaningless infinite marquee as faux award-site signal |
|
|
66
|
+
|
|
67
|
+
## Modern native CSS motion primitives
|
|
68
|
+
|
|
69
|
+
Prefer declarative browser primitives over JS animation runtimes when targeting modern web surfaces—always pair with `@supports` progressive enhancement and `@media (prefers-reduced-motion: reduce)`:
|
|
70
|
+
|
|
71
|
+
```css
|
|
72
|
+
/* 1. Critically damped operational spring curve (zeta >= 0.85, zero rubbery overshoot) */
|
|
73
|
+
:root {
|
|
74
|
+
--ease-spring-operational: linear(
|
|
75
|
+
0, 0.012, 0.049 2.2%, 0.194 5%, 0.421 9%, 0.728 15.5%,
|
|
76
|
+
0.892 20.8%, 0.968 25.4%, 0.996 29.8%, 1.004 35%, 1.002 46%, 1
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* 2. Origin-aware 0.96 -> 1.0 scale + asymmetric faster exit (115ms close vs 180ms open) */
|
|
81
|
+
[popover], dialog {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transform-origin: var(--popover-origin, top left);
|
|
84
|
+
transform: scale(0.96) translateY(-2px);
|
|
85
|
+
/* Exit transition (applies when closing): brisk 115ms ease-in */
|
|
86
|
+
transition: opacity 115ms ease-in, transform 115ms ease-in,
|
|
87
|
+
overlay 115ms allow-discrete, display 115ms allow-discrete;
|
|
88
|
+
}
|
|
89
|
+
[popover]:popover-open, dialog[open] {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transform: scale(1) translateY(0);
|
|
92
|
+
/* Enter transition (applies when opening): 180ms damped spring */
|
|
93
|
+
transition: opacity 160ms ease-out, transform 180ms var(--ease-spring-operational),
|
|
94
|
+
overlay 180ms allow-discrete, display 180ms allow-discrete;
|
|
95
|
+
@starting-style { opacity: 0; transform: scale(0.96) translateY(-2px); }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* 3. Cross-document View Transitions + shared group styling */
|
|
99
|
+
@view-transition { navigation: auto; }
|
|
100
|
+
.card-media { view-transition-class: card-morph; }
|
|
101
|
+
::view-transition-group(.card-morph) { animation-duration: 240ms; }
|
|
102
|
+
|
|
103
|
+
/* 4. Scroll-driven animations gated by @supports and reduced-motion */
|
|
104
|
+
@supports (animation-timeline: view()) {
|
|
105
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
106
|
+
.reading-progress {
|
|
107
|
+
animation: grow-bar linear both;
|
|
108
|
+
animation-timeline: scroll(root block);
|
|
109
|
+
}
|
|
110
|
+
.chapter-figure {
|
|
111
|
+
animation: reveal-figure linear both;
|
|
112
|
+
animation-timeline: view();
|
|
113
|
+
animation-range: entry 10% cover 35%;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* 5. Scroll-state container queries (sticky header elevation without JS scroll listeners) */
|
|
119
|
+
.header-wrap { container-type: scroll-state; position: sticky; top: 0; }
|
|
120
|
+
@container scroll-state(stuck: top) {
|
|
121
|
+
.site-header { border-bottom-color: var(--semantic-border-strong); }
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Scrolljacking boundary
|
|
126
|
+
|
|
127
|
+
Default answer: **do not scrolljack**. Scroll manipulation commonly disorients users; when stakeholders insist, use it only for functional value, keep required scroll input small, make change visible quickly, preserve normal scrollbar/progress, provide direct section links, avoid precision-dependent reveals, and user-test the rate. Never hijack input, invert direction, suppress keyboard/scrollbar behavior, or make content vanish on a slight overscroll.
|
|
128
|
+
|
|
129
|
+
## Reduced-motion matrix
|
|
130
|
+
|
|
131
|
+
1. preserve causality with an instant state change;
|
|
132
|
+
2. replace spatial movement with opacity/fade or static crossfade;
|
|
133
|
+
3. show a static intermediate/endpoint sequence;
|
|
134
|
+
4. provide text/icon/haptic/audio equivalent where appropriate;
|
|
135
|
+
5. respect `prefers-reduced-motion` on web and platform Reduce Motion settings natively; Apple specifically calls out limiting automatic/repetitive zoom, scale, peripheral motion, z-depth, and blur transitions.
|
|
136
|
+
|
|
137
|
+
Deleting feedback is not a reduced-motion path. Motion-triggering vestibular risk includes large-scale panning/zooming, spinning, parallax, autoforwarding carousels, and scrolljacking.
|
|
138
|
+
|
|
139
|
+
## Implementation checklist
|
|
140
|
+
|
|
141
|
+
- input stays interactive during nonessential animation;
|
|
142
|
+
- focus never remains inside removed content;
|
|
143
|
+
- no flashing/rapid oscillation or photosensitive pattern;
|
|
144
|
+
- animations pause offscreen/backgrounded and do not run in dense operational screens;
|
|
145
|
+
- DOM/visual order remain coherent for keyboard, controller, and assistive tech;
|
|
146
|
+
- frame budget verified on a mid-tier device, not only a developer workstation;
|
|
147
|
+
- reduced-motion, forced-colors, high-contrast, RTL, 200% text, and narrow viewport paths inspected;
|
|
148
|
+
- one sentence recorded for why each signature motion exists and what replaces it when motion is unavailable.
|
|
149
|
+
|
|
150
|
+
## Detectable motion inventory
|
|
151
|
+
|
|
152
|
+
Before preserving a motion system, inventory what the rendered page actually exposes: animation and transition counts, canvas/WebGL presence, smooth-scroll libraries, scroll-driven CSS, view transitions, custom cursor styles, and detectable `prefers-reduced-motion` rules. In the live corpus, a detectable reduced-motion stylesheet appeared on only about **58%** of pages, while likely scroll manipulation appeared on about **21%** and custom cursor styles on about **30%**. Use those figures as prevalence evidence for verification failure, never as permission.
|
|
153
|
+
|
|
154
|
+
Detection is heuristic. Script/global inspection can false-positive library names, cross-origin CSS may be unreadable, and a media query does not prove correct behavior. Absence of a detectable media query is a lead, not a violation; presence is not proof either. Verify reduced motion by rendering the actual setting.
|
|
155
|
+
|
|
156
|
+
Required gate:
|
|
157
|
+
|
|
158
|
+
1. audit Lenis/Locomotive or equivalent smooth-scroll libraries, hidden overflow, wheel/touch input remapping, pinned scroll regions, and missing or broken direct section links;
|
|
159
|
+
2. scroll manipulation requires a user-facing functional reason and explicit waiver;
|
|
160
|
+
3. custom cursors require keyboard/touch parity plus an ordinary system-cursor fallback;
|
|
161
|
+
4. canvas/WebGL content requires semantic text, static fallback, pause/mute control where applicable, and a measured performance budget;
|
|
162
|
+
5. every signature motion names its reduced-motion replacement before implementation;
|
|
163
|
+
6. keep initial-viewport idle looping animations at zero on operational/product surfaces—concentrate motion budget on short, compositor-only interactive transitions (`transform`/`opacity`) and prefer browser-native CSS Scroll-Driven Animations, `@starting-style`, and View Transitions API with progressive fallbacks over heavy JS animation runtimes.
|