principle-mobile-native
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-10-11
- Stars
- ★ 0
- Forks
- 0
02 资源文件 1
- 参考文档agents/openai.yaml214 B
03 SKILL.md 正文
Mobile Native
Most "janky on mobile" reports are not animation problems. They are a tap delay, a gray flash, or a hover state that will not let go. Most of these are one line. Emulation does not reproduce them; test on real hardware.
Symptom to fix
| Problem | Fix |
|---|---|
| Hover state stuck after tap | Wrap in @media (hover: hover) and (pointer: fine) |
| Gray or blue flash on tap | -webkit-tap-highlight-color: transparent |
| Wrong layout height | 100dvh for an app shell, 100svh for a hero |
| Page zooms into an input | Inputs at 16px minimum; fix the cause, never disable zoom |
| Tap feels laggy | Feedback on pointer-down plus touch-action: manipulation |
| Pull-to-refresh hijacks scroll | overscroll-behavior: none on html, body, contain on inner scrollers |
| Content stops at the notch | viewport-fit=cover plus env(safe-area-inset-*) |
| Long-press selects control text | user-select: none on controls, never on body content |
| Carousel scrolls the wrong way | touch-action: pan-y (or pan-x) on the gesture surface |
| Status bar color wrong | One theme-color per prefers-color-scheme |
| Wrong on a phone but right in Chrome | Test on real hardware |
Rules
- Media queries over device sniffing.
(hover),(pointer),env(),dvhtell you what the device can do. Never branch on user agent or screen width to guess touch. - Touch and mouse are not exclusive. Write for both at once; gate by capability.
- Never disable zoom.
user-scalable=noandmaximum-scale=1are accessibility failures. - Feedback on press, not release. Native controls respond the instant a finger lands. Use
:active, orpointerdown, notclick.
Baseline
html {
-webkit-tap-highlight-color: transparent;
-webkit-text-size-adjust: 100%;
overscroll-behavior: none;
}
input, textarea, select { font-size: 16px; }
button, a, [role="button"] {
touch-action: manipulation;
user-select: none;
}
@media (hover: hover) and (pointer: fine) {
/* all :hover rules live here */
}
04 同仓库更多 Skills
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
wayfinder
Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
unslop
Cut AI tells from any writing. Must always apply.
triage
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.