mobile-native
Fix mobile web viewport, touch, safe-area, keyboard, scrolling, or PWA chrome issues. Use for phone-specific web behavior, not React Native or Swift.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- mobile-native
- description
- Fix mobile web viewport, touch, safe-area, keyboard, scrolling, or PWA chrome issues. Use for phone-specific web behavior, not React Native or Swift.
02 资源文件 2
- 许可证LICENSE1.0 KB
- 参考文档PLATFORM.md2.7 KB
03 SKILL.md 正文
Remove browser/platform friction without disabling accessibility. Adapted from Emil Kowalski; provenance. Review requests stay read-only; fixes follow project TDD and delivery gates.
Diagnose and scope
For responsive grouping, RTL and safe-area structure, read interface compatibility, then better-layout. For font rendering or input zoom, use better-typography without disabling user scaling or replacing this skill's device checks.
Identify the reported phone/browser, layout, input path, keyboard/PWA mode, and supported devices. Reproduce before changing defaults. Use capability queries rather than user-agent sniffing; touch and mouse can coexist. Existing UI primitives and tokens remain owners.
| Symptom | Narrow correction |
|---|---|
| Sticky hover after tap | Gate decorative hover with (hover: hover) and (pointer: fine); keep focus/press feedback |
| Tap highlight competes with designed feedback | Scope transparent tap highlight to controls only after equivalent feedback exists |
| Bottom action under browser chrome | 100dvh for the app shell; 100svh for stable hero content |
| Input focus zoom | At least 16 CSS px computed input text; retain user scaling |
| Press feels late | CSS :active/pointer-down feedback; keep activation on accessible click/submit |
| Scroll chains behind a sheet | overscroll-behavior: contain on the actual scroller |
| Notch/home indicator covers content | viewport-fit=cover, then padding with env(safe-area-inset-*, 0px) |
| Control label selected while dragging | Scope user-select: none to that control; keep readable content selectable |
| Custom horizontal gesture fights scrolling | Local touch-action: pan-y pinch-zoom; preserve vertical scroll and pinch zoom |
| Theme chrome mismatches | Theme metadata consistent with actual resolved app theme |
Read PLATFORM.md for keyboard, gesture, overscroll, and PWA details. Check current browser support before applying optional viewport/meta features. For custom drag/swipe/sheet tracking, release physics or cancellation, load gestures; this skill retains browser/viewport ownership.
Preserve function
- Keep
width=device-width, initial-scale=1; preserve pinch zoom and large text. Never setuser-scalable=noor cap zoom atmaximum-scale=1. - Restrict gesture ownership to its handle/surface. Preserve pinch zoom when setting
touch-action;noneis not a general drag fix. Prefer native scroll/snap when it works. - Do not replace
clickwithpointerdownactivation: press feedback differs from committing an action. Keyboard activation, scrolling away, andpointercancelmust work. - Root overscroll changes are product-specific. Keep browser refresh/scroll behavior on documents; contain only the app region that owns the gesture.
- Preserve copy/select, link context menus, focus rings, and semantic control roles. Keep listeners passive unless a narrowly justified cancellation actually needs otherwise.
Verify
Replay touch and keyboard journeys, pinch zoom/200% text, portrait/landscape, open keyboard, address-bar expansion/collapse, nested scrolling, and supported light/dark/PWA modes. Browser emulation checks layout; record which behaviors were confirmed on physical hardware. If hardware is unavailable, report code/emulation evidence and the remaining phone checks. Do not expose the dev server on the network solely to satisfy this skill.
Report symptom -> changed declaration -> observed behavior, plus unverified device paths.
04 同仓库更多 Skills
learn-taste
Turn a session's design corrections into scoped, reasoned rules for future agents. Use for /learn-taste or requests to remember design feedback, not general workflow retrospectives.
learn-taste
Turn a session's design corrections into scoped, reasoned rules for future agents. Use for /learn-taste or requests to remember design feedback, not general workflow retrospectives.
pull-requests
Use when finalizing a pull request or continuing an existing one; preserve the requested endpoint and draft state.
pull-requests
Use when finalizing a pull request or continuing an existing one; preserve the requested endpoint and draft state.
hill-climb
Optimize a defined outcome through bounded evaluation loops. Use for hill-climb requests or repeated improvement against an executable eval, benchmark, or visual comparison; not a one-pass review.
gestures
Build or fix web drag, swipe, sheet, reorder, and hold interactions: direct tracking, rubber banding, release velocity, momentum, snap points, and interruption. Not native React Native or Swift.