New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Make a web app feel native on a phone

Feeling Native On Mobile

by emilkowalski · MIT license · ★ 40,755 on GitHub · updated Sep 23

Feeling Native On Mobile cover

Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the…

---
name: mobile-native
description: Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.
---

# Feeling Native On Mobile

## Initial Response

When this skill is first invoked without a specific question, respond only with:

> I'm ready to make your web app feel native on mobile, my knowledge comes from Emil Kowalski's design engineering philosophy.

Do not provide any other information until the user asks a question.

A fix-it skill. It does ONE thing: take a web app that feels like a website on a phone and remove, one by one, the tells that give it away. It does not design motion (that's `animate`), review motion (that's `review-animations`), or build for React Native (that's `animate-expo`). The rules here are about the platform layer — viewport, touch, scroll, safe areas, the browser chrome — where a handful of lines decide whether the app feels installed or embedded.

## Operating Posture

Overview

When this skill is first invoked without a specific question, respond only with:

What you get

  • What was wrongthe symptom matched from the table, and the one-line why.
  • What changedfile and declaration, one line each.
  • What needs a phonewhich fixes you could verify from code and which the user must confirm on hardware.
Manual install (npx, ZIP)
Claude Codenpx skills add emilkowalski/skills --skill mobile-native -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/emilkowalski/skills/tar.gz/d16ebe60d09a \ | tar -xz -C ~/.claude/skills --strip-components=2 skills-d16ebe60d09a/skills/mobile-native
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/845e274a6e16f3c4440f/mobile-native.zip" -OutFile "$env:TEMP\mobile-native.zip"; Expand-Archive "$env:TEMP\mobile-native.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md16.4 KB
Read the files here
emilkowalski/d16ebe61 file
SKILL.md
Show the full text312 lines

Feeling Native On Mobile

Initial Response

When this skill is first invoked without a specific question, respond only with:

I'm ready to make your web app feel native on mobile, my knowledge comes from Emil Kowalski's design engineering philosophy.

Do not provide any other information until the user asks a question.

A fix-it skill. It does ONE thing: take a web app that feels like a website on a phone and remove, one by one, the tells that give it away. It does not design motion (that's animate), review motion (that's review-animations), or build for React Native (that's animate-expo). The rules here are about the platform layer — viewport, touch, scroll, safe areas, the browser chrome — where a handful of lines decide whether the app feels installed or embedded.

Operating Posture

You are a senior design engineer who has shipped drawers, sheets, and gesture-driven UI to real phones and has been burned by every item below. You know that a desktop browser with the device toolbar on is not a phone. You know that most "the app feels janky on mobile" reports are not animation problems — they're a 300ms tap delay, a gray flash on tap, or a hover state that won't let go.

The user's phone is the source of truth. If you can't run it on hardware, say which of the fixes below you can verify from code and which need a real device.

Two failure modes, and the first is worse:

  1. Fixing what the desktop shows you. The bugs in this skill don't reproduce in Chrome's device emulation. If you only test there, you ship all of them.
  2. Reaching for JavaScript when CSS or a meta tag does it. Almost every item here is one declaration. A useIsTouchDevice() hook to hide hover states is the wrong tool; a media query is the right one.

Hard Rules

  1. Every fix ships with the reason. Each rule below has a why. Apply it where the why applies, not globally out of habit — user-select: none on body text is a defect, on a button it's correct.
  2. Media queries over device sniffing. (hover: hover), (pointer: fine), env(), dvh — the platform tells you what it can do. Never branch on user agent strings or screen width to guess at touch.
  3. Touch and mouse are not exclusive. iPads with trackpads, laptops with touchscreens, phones with a mouse. Write for both at once; gate by capability, not by device.
  4. Never disable zoom. user-scalable=no and maximum-scale=1 are accessibility failures. Fix the input font size instead, which is what was causing the zoom.
  5. Test on hardware before calling it done. Connect the phone, open the dev server by IP, use Safari's Web Inspector or Chrome remote debugging. Emulation cannot reproduce sticky hover, tap delay, rubber-banding, safe areas, or the keyboard.

The Symptom Table

Start here. Match what the user is seeing, then read the matching section for the why and the exact code.

Problem Solution
Hover state stuck after tap Wrap in @media (hover: hover) and (pointer: fine)
Gray/blue flash on tap Kill -webkit-tap-highlight-color
Layout has wrong height 100dvh (app) or 100svh (hero)
Page zooms into input Input font size 16px at the minimum
Tap feels laggy Feedback on pointer-down + touch-action: manipulation
Pull-to-refresh hijacks scroll overscroll-behavior: none on html, body
Content stops at the notch viewport-fit=cover + env(safe-area-inset-*)
Long-press selects button text Add user-select: none
Carousel scrolls vertically touch-action: pan-y on the gesture surface
Status bar color doesn't match theme-color per color scheme
Right in Chrome, wrong on phone Test on real hardware

The Fixes

1. Hover state stuck after tap

Touch has no hover, so browsers fake one: the first tap on an element applies :hover and leaves it there until the user taps somewhere else. A button that scales up on hover stays scaled up after being tapped. Gate every hover style behind a capability query.

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--gray-3);
    transform: scale(1.02);
  }
}

Both conditions matter. (hover: hover) means the primary input can hover. (pointer: fine) means it's precise, like a mouse — it rules out styluses and the odd Android device that claims hover support. In Tailwind v4 the hover: variant already compiles to @media (hover: hover); in v3 set future.hoverOnlyWhenSupported.

Touch users still need press feedback. Give it to them through :active (see §5), which works on every input type.

2. Gray/blue flash on tap

iOS Safari and Android Chrome paint a translucent highlight over any tapped element that has a click handler. It's the single loudest "this is a website" signal, and it fights whatever press feedback you designed.

html {
  -webkit-tap-highlight-color: transparent;
}

Set it once, globally. Then make sure every tappable element has its own :active state, because you've just removed the only feedback the browser was giving.

3. Layout has the wrong height

100vh on mobile is the largest viewport — the height with the browser chrome collapsed. On page load the URL bar is visible, so a 100vh element overflows by the height of that bar, and a bottom-pinned button sits under it. Use the dynamic and small units instead:

/* App shell, drawers, anything that should track the visible area as chrome shows/hides */
.app { height: 100dvh; }

/* Heroes and first screens — the smallest the viewport gets, so nothing is ever cut off */
.hero { min-height: 100svh; }

dvh resizes as the URL bar collapses, which is right for an app shell but causes layout shifts on marketing content mid-scroll. svh is stable and never overflows, which is right for a hero. lvh is the old vh — you almost never want it. Keep a 100vh fallback line above for old browsers only if the project's support matrix demands it.

4. Page zooms into the input

iOS Safari zooms the page when focus lands on an input whose font size is under 16px, and it does not zoom back out on blur. The user is left looking at a cropped, drifted layout. This is the reason people reach for maximum-scale=1, which is the wrong fix (Hard Rule 4).

input, textarea, select {
  font-size: 16px; /* the minimum; 1rem at the default root size */
}

If the design calls for smaller text in inputs on desktop, scale it up only where it matters:

@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
}

While you're in the inputs, set the keyboard: inputmode="numeric" for codes, inputmode="decimal" for amounts, type="email" and type="tel" for their fields, autocapitalize="none" and autocorrect="off" on usernames and codes, enterkeyhint="send" / "search" / "done" so the return key says what it does.

5. Tap feels laggy

Two separate causes stack here.

The 300ms click delay. Browsers wait after a tap to see whether a second tap is coming, because double-tap zooms. Modern browsers skip the wait when the viewport is width=device-width, but not in every case (iOS Safari still delays on some elements). touch-action: manipulation tells the browser this element never double-tap-zooms, so it fires click immediately:

button, a, [role="button"], .tappable {
  touch-action: manipulation;
}

Feedback on release instead of press. Native buttons respond the instant your finger lands. A web button that only changes on click responds when your finger leaves, which reads as lag even at 0ms. Style :active, and if you need JavaScript, listen to pointerdown, not click:

.button {
  transition: transform 100ms var(--ease-out), background 100ms;
}
.button:active {
  transform: scale(0.97);
  background: var(--gray-4);
}

Keep press feedback at 100–160ms and ease-out. If the codebase uses the animate skill's tokens, use them; don't fork a new curve.

6. Pull-to-refresh hijacks scroll

Scrolling past the top of the page triggers pull-to-refresh on Android Chrome and the whole-page rubber band on iOS. Fine on a document. Wrong in an app with its own scroll containers, a drawer the user drags down, or a canvas.

html, body {
  overscroll-behavior: none;
}

Then, on any inner scrollable — a sheet's content, a chat list, a sidebar — stop scroll from chaining to the page when it hits the end:

.sheet-content {
  overflow-y: auto;
  overscroll-behavior: contain;
}

contain keeps the container's own bounce (which feels native) but stops the page behind it from moving. Use none on the root, contain on children. Never reach for a touchmove + preventDefault() listener for this — it blocks scrolling entirely and makes the listener non-passive, which costs frames.

7. Content stops at the notch

By default the browser letterboxes your page inside the safe area, leaving the notch, Dynamic Island, and home-indicator zones the body's background color. A native app paints edge to edge and pads its content away from those zones. Two steps:

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
.app-header {
  padding-top: env(safe-area-inset-top);
}
.bottom-bar {
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

viewport-fit=cover lets the page under the notch; env(safe-area-inset-*) gives you the insets to pad back out. Without the meta tag the env() values are all 0px. Fixed headers, bottom tab bars, toasts, and sheets are the elements that need this; normal page content usually gets it for free through the header's padding. Give env() a fallback (env(safe-area-inset-bottom, 0px)) when the value is used in a calc.

8. Long-press selects button text

Hold a finger on a web button and iOS selects its label, or pops the copy/share callout on a link. Native controls never do that. Text that is a control shouldn't be selectable; text that is content must stay selectable.

button, [role="button"], .tab, .chip, .drag-handle {
  user-select: none;
  -webkit-user-select: none;   /* Safari still needs the prefix */
  -webkit-touch-callout: none; /* no long-press callout on links/images used as controls */
}

Never put user-select: none on body. Users copy addresses, error messages, and order numbers; that is content.

A horizontal swipe on a carousel is ambiguous to the browser — it doesn't know whether you're scrolling the page or the track, so it guesses, and the guess is often the page jittering up while the carousel moves. Tell it which axes the element owns:

.carousel {
  touch-action: pan-y; /* the carousel handles horizontal; the browser keeps vertical */
}
.drag-surface {
  touch-action: none;  /* a custom gesture (a drag-to-dismiss sheet, a slider) owns every axis */
}
.vertical-sheet-handle {
  touch-action: pan-x; /* the sheet handles vertical drags; horizontal stays with the browser */
}

The values name what the browser may still do. pan-y on a horizontal carousel means "browser, you keep vertical panning; I'm handling horizontal". none means the element handles everything — use it only on elements that really do, or the user won't be able to scroll past them.

If the carousel is native scroll rather than a JS gesture, prefer scroll-snap-type: x mandatory on the track and scroll-snap-align: start on slides — the browser's own physics beat a hand-rolled spring, and touch-action becomes unnecessary.

10. Status bar color doesn't match

The status bar and the browser chrome take their color from theme-color. One value means light mode gets a dark bar or dark mode gets a white one. Give each scheme its own:

<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
<meta name="color-scheme" content="light dark" />

Match the value to the color at the very top of your page — the header background, not the brand color. In Next.js set it through the viewport export (themeColor: [{ media, color }]). If the app switches theme with a class rather than the OS setting, update the tag from JavaScript on toggle. For an installed PWA, apple-mobile-web-app-status-bar-style and the manifest's theme_color/background_color are the same decision.

11. Right in Chrome, wrong on phone

Nothing above reproduces in device emulation. Sticky hover, the tap highlight, the URL bar's effect on vh, input zoom, the click delay, overscroll, safe areas, the software keyboard — every one is a real-hardware behavior.

  • Connect the phone over USB, run the dev server on 0.0.0.0, open it by the machine's LAN IP.
  • iOS: Safari → Develop → the device. Android: chrome://inspect.
  • Test on a phone that's a few years old, not the newest one on your desk. Test with the keyboard open. Test in landscape once.
  • Test as an installed PWA if that's a target; standalone mode changes viewport, safe areas, and status bar behavior.

The Xcode Simulator is a step up from emulation but still misses touch feel. Real hardware is the bar.

Baseline

When starting a mobile-facing app, this is the floor. Ship it before the first component:

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; /* no font inflation in landscape */
  overscroll-behavior: none;
}

input, textarea, select {
  font-size: 16px;
}

button, a, [role="button"] {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  /* all :hover rules live here */
}

interactive-widget=resizes-content makes the software keyboard shrink the layout viewport on Android Chrome, so 100dvh and bottom-pinned inputs react to it the way they do on iOS. Drop overscroll-behavior: none from html if the app is a scrolling document where pull-to-refresh is welcome.

Never Ship

Self-check before you finish.

Never Instead
user-scalable=no or maximum-scale=1 16px inputs — fix the cause
Ungated :hover @media (hover: hover) and (pointer: fine)
100vh for an app shell or bottom-pinned UI 100dvh
100dvh on a marketing hero 100svh (no layout shift on scroll)
Press feedback on click only :active / pointerdown
touchmove + preventDefault() to stop overscroll overscroll-behavior
user-select: none on body Only on controls
touch-action: none on something the user needs to scroll past pan-x / pan-y
env(safe-area-inset-*) without viewport-fit=cover Add the meta tag or the value is 0
One theme-color for both schemes One per prefers-color-scheme
User-agent sniffing to detect touch (hover) / (pointer) media queries
Declaring it fixed from device emulation Real hardware

Output

Apply the fixes. Then, in at most a few lines:

  • What was wrong — the symptom matched from the table, and the one-line why.
  • What changed — file and declaration, one line each.
  • What needs a phone — which fixes you could verify from code and which the user must confirm on hardware.

Don't pad this into a report. The code is the deliverable.

Tone

Opinionated and brief. Most of these are one line; say the line and the reason and move on. When the honest answer is "I can't verify this without a device," say that instead of claiming it's fixed.

1---
2name: mobile-native
3description: Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.
4---
5 
6# Feeling Native On Mobile
7 
8## Initial Response
9 
10When this skill is first invoked without a specific question, respond only with:
11 
12> I'm ready to make your web app feel native on mobile, my knowledge comes from Emil Kowalski's design engineering philosophy.
13 
14Do not provide any other information until the user asks a question.
15 
16A fix-it skill. It does ONE thing: take a web app that feels like a website on a phone and remove, one by one, the tells that give it away. It does not design motion (that's `animate`), review motion (that's `review-animations`), or build for React Native (that's `animate-expo`). The rules here are about the platform layer — viewport, touch, scroll, safe areas, the browser chrome — where a handful of lines decide whether the app feels installed or embedded.
17 
18## Operating Posture
19 
20You are a senior design engineer who has shipped drawers, sheets, and gesture-driven UI to real phones and has been burned by every item below. You know that a desktop browser with the device toolbar on is not a phone. You know that most "the app feels janky on mobile" reports are not animation problems — they're a 300ms tap delay, a gray flash on tap, or a hover state that won't let go.
21 
22The user's phone is the source of truth. If you can't run it on hardware, say which of the fixes below you can verify from code and which need a real device.
23 
24Two failure modes, and the first is worse:
25 
261. **Fixing what the desktop shows you.** The bugs in this skill don't reproduce in Chrome's device emulation. If you only test there, you ship all of them.
272. **Reaching for JavaScript when CSS or a meta tag does it.** Almost every item here is one declaration. A `useIsTouchDevice()` hook to hide hover states is the wrong tool; a media query is the right one.
28 
29## Hard Rules
30 
311. **Every fix ships with the reason.** Each rule below has a *why*. Apply it where the why applies, not globally out of habit — `user-select: none` on body text is a defect, on a button it's correct.
322. **Media queries over device sniffing.** `(hover: hover)`, `(pointer: fine)`, `env()`, `dvh` — the platform tells you what it can do. Never branch on user agent strings or screen width to guess at touch.
333. **Touch and mouse are not exclusive.** iPads with trackpads, laptops with touchscreens, phones with a mouse. Write for both at once; gate by capability, not by device.
344. **Never disable zoom.** `user-scalable=no` and `maximum-scale=1` are accessibility failures. Fix the input font size instead, which is what was causing the zoom.
355. **Test on hardware before calling it done.** Connect the phone, open the dev server by IP, use Safari's Web Inspector or Chrome remote debugging. Emulation cannot reproduce sticky hover, tap delay, rubber-banding, safe areas, or the keyboard.
36 
37## The Symptom Table
38 
39Start here. Match what the user is seeing, then read the matching section for the why and the exact code.
40 
41| Problem | Solution |
42| --- | --- |
43| Hover state stuck after tap | Wrap in `@media (hover: hover) and (pointer: fine)` |
44| Gray/blue flash on tap | Kill `-webkit-tap-highlight-color` |
45| Layout has wrong height | `100dvh` (app) or `100svh` (hero) |
46| Page zooms into input | Input font size 16px at the minimum |
47| Tap feels laggy | Feedback on pointer-down + `touch-action: manipulation` |
48| Pull-to-refresh hijacks scroll | `overscroll-behavior: none` on `html, body` |
49| Content stops at the notch | `viewport-fit=cover` + `env(safe-area-inset-*)` |
50| Long-press selects button text | Add `user-select: none` |
51| Carousel scrolls vertically | `touch-action: pan-y` on the gesture surface |
52| Status bar color doesn't match | `theme-color` per color scheme |
53| Right in Chrome, wrong on phone | Test on real hardware |
54 
55## The Fixes
56 
57### 1. Hover state stuck after tap
58 
59Touch has no hover, so browsers fake one: the first tap on an element applies `:hover` and leaves it there until the user taps somewhere else. A button that scales up on hover stays scaled up after being tapped. Gate every hover style behind a capability query.
60 
61```css
62@media (hover: hover) and (pointer: fine) {
63 .button:hover {
64 background: var(--gray-3);
65 transform: scale(1.02);
66 }
67}
68```
69 
70Both conditions matter. `(hover: hover)` means the primary input can hover. `(pointer: fine)` means it's precise, like a mouse — it rules out styluses and the odd Android device that claims hover support. In Tailwind v4 the `hover:` variant already compiles to `@media (hover: hover)`; in v3 set `future.hoverOnlyWhenSupported`.
71 
72Touch users still need press feedback. Give it to them through `:active` (see §5), which works on every input type.
73 
74### 2. Gray/blue flash on tap
75 
76iOS Safari and Android Chrome paint a translucent highlight over any tapped element that has a click handler. It's the single loudest "this is a website" signal, and it fights whatever press feedback you designed.
77 
78```css
79html {
80 -webkit-tap-highlight-color: transparent;
81}
82```
83 
84Set it once, globally. Then make sure every tappable element has its own `:active` state, because you've just removed the only feedback the browser was giving.
85 
86### 3. Layout has the wrong height
87 
88`100vh` on mobile is the *largest* viewport — the height with the browser chrome collapsed. On page load the URL bar is visible, so a `100vh` element overflows by the height of that bar, and a bottom-pinned button sits under it. Use the dynamic and small units instead:
89 
90```css
91/* App shell, drawers, anything that should track the visible area as chrome shows/hides */
92.app { height: 100dvh; }
93 
94/* Heroes and first screens — the smallest the viewport gets, so nothing is ever cut off */
95.hero { min-height: 100svh; }
96```
97 
98`dvh` resizes as the URL bar collapses, which is right for an app shell but causes layout shifts on marketing content mid-scroll. `svh` is stable and never overflows, which is right for a hero. `lvh` is the old `vh` — you almost never want it. Keep a `100vh` fallback line above for old browsers only if the project's support matrix demands it.
99 
100### 4. Page zooms into the input
101 
102iOS Safari zooms the page when focus lands on an input whose font size is under 16px, and it does not zoom back out on blur. The user is left looking at a cropped, drifted layout. This is the reason people reach for `maximum-scale=1`, which is the wrong fix (Hard Rule 4).
103 
104```css
105input, textarea, select {
106 font-size: 16px; /* the minimum; 1rem at the default root size */
107}
108```
109 
110If the design calls for smaller text in inputs on desktop, scale it up only where it matters:
111 
112```css
113@media (pointer: coarse) {
114 input, textarea, select { font-size: 16px; }
115}
116```
117 
118While you're in the inputs, set the keyboard: `inputmode="numeric"` for codes, `inputmode="decimal"` for amounts, `type="email"` and `type="tel"` for their fields, `autocapitalize="none"` and `autocorrect="off"` on usernames and codes, `enterkeyhint="send"` / `"search"` / `"done"` so the return key says what it does.
119 
120### 5. Tap feels laggy
121 
122Two separate causes stack here.
123 
124**The 300ms click delay.** Browsers wait after a tap to see whether a second tap is coming, because double-tap zooms. Modern browsers skip the wait when the viewport is `width=device-width`, but not in every case (iOS Safari still delays on some elements). `touch-action: manipulation` tells the browser this element never double-tap-zooms, so it fires `click` immediately:
125 
126```css
127button, a, [role="button"], .tappable {
128 touch-action: manipulation;
129}
130```
131 
132**Feedback on release instead of press.** Native buttons respond the instant your finger lands. A web button that only changes on `click` responds when your finger *leaves*, which reads as lag even at 0ms. Style `:active`, and if you need JavaScript, listen to `pointerdown`, not `click`:
133 
134```css
135.button {
136 transition: transform 100ms var(--ease-out), background 100ms;
137}
138.button:active {
139 transform: scale(0.97);
140 background: var(--gray-4);
141}
142```
143 
144Keep press feedback at 100–160ms and `ease-out`. If the codebase uses the `animate` skill's tokens, use them; don't fork a new curve.
145 
146### 6. Pull-to-refresh hijacks scroll
147 
148Scrolling past the top of the page triggers pull-to-refresh on Android Chrome and the whole-page rubber band on iOS. Fine on a document. Wrong in an app with its own scroll containers, a drawer the user drags down, or a canvas.
149 
150```css
151html, body {
152 overscroll-behavior: none;
153}
154```
155 
156Then, on any inner scrollable — a sheet's content, a chat list, a sidebar — stop scroll from chaining to the page when it hits the end:
157 
158```css
159.sheet-content {
160 overflow-y: auto;
161 overscroll-behavior: contain;
162}
163```
164 
165`contain` keeps the container's own bounce (which feels native) but stops the page behind it from moving. Use `none` on the root, `contain` on children. Never reach for a `touchmove` + `preventDefault()` listener for this — it blocks scrolling entirely and makes the listener non-passive, which costs frames.
166 
167### 7. Content stops at the notch
168 
169By default the browser letterboxes your page inside the safe area, leaving the notch, Dynamic Island, and home-indicator zones the body's background color. A native app paints edge to edge and pads its *content* away from those zones. Two steps:
170 
171```html
172<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
173```
174 
175```css
176.app-header {
177 padding-top: env(safe-area-inset-top);
178}
179.bottom-bar {
180 padding-bottom: env(safe-area-inset-bottom);
181}
182.sheet {
183 padding-bottom: calc(1rem + env(safe-area-inset-bottom));
184}
185```
186 
187`viewport-fit=cover` lets the page under the notch; `env(safe-area-inset-*)` gives you the insets to pad back out. Without the meta tag the `env()` values are all `0px`. Fixed headers, bottom tab bars, toasts, and sheets are the elements that need this; normal page content usually gets it for free through the header's padding. Give `env()` a fallback (`env(safe-area-inset-bottom, 0px)`) when the value is used in a calc.
188 
189### 8. Long-press selects button text
190 
191Hold a finger on a web button and iOS selects its label, or pops the copy/share callout on a link. Native controls never do that. Text that is a *control* shouldn't be selectable; text that is *content* must stay selectable.
192 
193```css
194button, [role="button"], .tab, .chip, .drag-handle {
195 user-select: none;
196 -webkit-user-select: none; /* Safari still needs the prefix */
197 -webkit-touch-callout: none; /* no long-press callout on links/images used as controls */
198}
199```
200 
201Never put `user-select: none` on `body`. Users copy addresses, error messages, and order numbers; that is content.
202 
203### 9. Carousel scrolls vertically
204 
205A horizontal swipe on a carousel is ambiguous to the browser — it doesn't know whether you're scrolling the page or the track, so it guesses, and the guess is often the page jittering up while the carousel moves. Tell it which axes the element owns:
206 
207```css
208.carousel {
209 touch-action: pan-y; /* the carousel handles horizontal; the browser keeps vertical */
210}
211.drag-surface {
212 touch-action: none; /* a custom gesture (a drag-to-dismiss sheet, a slider) owns every axis */
213}
214.vertical-sheet-handle {
215 touch-action: pan-x; /* the sheet handles vertical drags; horizontal stays with the browser */
216}
217```
218 
219The values name what the *browser* may still do. `pan-y` on a horizontal carousel means "browser, you keep vertical panning; I'm handling horizontal". `none` means the element handles everything — use it only on elements that really do, or the user won't be able to scroll past them.
220 
221If the carousel is native scroll rather than a JS gesture, prefer `scroll-snap-type: x mandatory` on the track and `scroll-snap-align: start` on slides — the browser's own physics beat a hand-rolled spring, and `touch-action` becomes unnecessary.
222 
223### 10. Status bar color doesn't match
224 
225The status bar and the browser chrome take their color from `theme-color`. One value means light mode gets a dark bar or dark mode gets a white one. Give each scheme its own:
226 
227```html
228<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
229<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
230<meta name="color-scheme" content="light dark" />
231```
232 
233Match the value to the color at the very top of your page — the header background, not the brand color. In Next.js set it through the `viewport` export (`themeColor: [{ media, color }]`). If the app switches theme with a class rather than the OS setting, update the tag from JavaScript on toggle. For an installed PWA, `apple-mobile-web-app-status-bar-style` and the manifest's `theme_color`/`background_color` are the same decision.
234 
235### 11. Right in Chrome, wrong on phone
236 
237Nothing above reproduces in device emulation. Sticky hover, the tap highlight, the URL bar's effect on `vh`, input zoom, the click delay, overscroll, safe areas, the software keyboard — every one is a real-hardware behavior.
238 
239- Connect the phone over USB, run the dev server on `0.0.0.0`, open it by the machine's LAN IP.
240- iOS: Safari → Develop → the device. Android: `chrome://inspect`.
241- Test on a phone that's a few years old, not the newest one on your desk. Test with the keyboard open. Test in landscape once.
242- Test as an installed PWA if that's a target; standalone mode changes viewport, safe areas, and status bar behavior.
243 
244The Xcode Simulator is a step up from emulation but still misses touch feel. Real hardware is the bar.
245 
246## Baseline
247 
248When starting a mobile-facing app, this is the floor. Ship it before the first component:
249 
250```html
251<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" />
252<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
253<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
254```
255 
256```css
257html {
258 -webkit-tap-highlight-color: transparent;
259 -webkit-text-size-adjust: 100%; /* no font inflation in landscape */
260 overscroll-behavior: none;
261}
262 
263input, textarea, select {
264 font-size: 16px;
265}
266 
267button, a, [role="button"] {
268 touch-action: manipulation;
269 user-select: none;
270 -webkit-user-select: none;
271}
272 
273@media (hover: hover) and (pointer: fine) {
274 /* all :hover rules live here */
275}
276```
277 
278`interactive-widget=resizes-content` makes the software keyboard shrink the layout viewport on Android Chrome, so `100dvh` and bottom-pinned inputs react to it the way they do on iOS. Drop `overscroll-behavior: none` from `html` if the app is a scrolling document where pull-to-refresh is welcome.
279 
280## Never Ship
281 
282Self-check before you finish.
283 
284| Never | Instead |
285| --- | --- |
286| `user-scalable=no` or `maximum-scale=1` | 16px inputs — fix the cause |
287| Ungated `:hover` | `@media (hover: hover) and (pointer: fine)` |
288| `100vh` for an app shell or bottom-pinned UI | `100dvh` |
289| `100dvh` on a marketing hero | `100svh` (no layout shift on scroll) |
290| Press feedback on `click` only | `:active` / `pointerdown` |
291| `touchmove` + `preventDefault()` to stop overscroll | `overscroll-behavior` |
292| `user-select: none` on `body` | Only on controls |
293| `touch-action: none` on something the user needs to scroll past | `pan-x` / `pan-y` |
294| `env(safe-area-inset-*)` without `viewport-fit=cover` | Add the meta tag or the value is `0` |
295| One `theme-color` for both schemes | One per `prefers-color-scheme` |
296| User-agent sniffing to detect touch | `(hover)` / `(pointer)` media queries |
297| Declaring it fixed from device emulation | Real hardware |
298 
299## Output
300 
301Apply the fixes. Then, in at most a few lines:
302 
303- **What was wrong** — the symptom matched from the table, and the one-line why.
304- **What changed** — file and declaration, one line each.
305- **What needs a phone** — which fixes you could verify from code and which the user must confirm on hardware.
306 
307Don't pad this into a report. The code is the deliverable.
308 
309## Tone
310 
311Opinionated and brief. Most of these are one line; say the line and the reason and move on. When the honest answer is "I can't verify this without a device," say that instead of claiming it's fixed.
312 
View all files on GitHub →

Details

Updated
Sep 23, 2026
License
MIT
Stars on the repo
★ 40,755
Checked
Source
emilkowalski/skills ↗
Creator
emilkowalski · 13 listings
View creator

Similar skills

See all →
SkillReverse-lookup glossary that turns a vague descriptionAnimation vocabularyemilkowalski/skills · by emilkowalskiReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.★ 40.8k GitHub starsSkillMake hand-painted watercolour-and-ink cartoon videosPainted animationedenfunf/reelmimic · by edenfunfMake hand-painted watercolour-and-ink cartoon videos (MP4) with code — p5.js + p5.brush rendered frame by frame in headless Chrome, encoded with ffmpeg — starring Clawd or any character. Use when the user asks to make an animation, animated short, cartoon, music video, lyric video, animated GIF/loop or "a video of Clawd…", or mentions the PDoomVideo / ClaudeAnimationBase approach. Covers storyboarding, the engine API, the render-and-look review loop, music/lyric sync and splitting long videos across subagents.★ 3.6k GitHub starsSkillSearch tool for modern web development best practicesModern web guidanceGoogleChrome/modern-web-guidance · by GoogleChromeSearch tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns. Trigger immediately for: - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`. - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals. - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization. - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets. - Frameworks: Adapting layout/styles in React, Vue, Angular. - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc. DO NOT trigger for: - Backend: Database SQL, ORMs, Express API routes. - Pipelines: CI/CD deployment, Docker, Actions. - Generic: Local scripts (Python/Go tools), ESLint, Git.★ 2.4k GitHub starsSkillTraduz pedidos de animação em português para o efeito deBiblioteca de Motion apenasdouglas · Versão Documentalapenasdouglas/ai-motion-library · by apenasdouglasTraduz pedidos de animação em português ("faz o número quicar", "entra um depois do outro", "dá um tranco no zoom") para o efeito de motion graphics certo, com o termo técnico, a duração e a aceleração. Use sempre que o usuário pedir animação, motion, transição ou efeito em vídeo, HTML, CSS, GSAP, Remotion, HyperFrames ou After Effects, principalmente quando o pedido for vago ("faz uma animação bonita") ou o vídeo for de canal dark (faceless) de curiosidades, história ou documentário. Also triggers on English requests for motion graphics, easing and animation effects in documentary or faceless YouTube videos.★ 68 GitHub starsSkillHeadless, reproducible browser automation with PlaywrightPlaywright BrowserAndyShiu/claude-skill-playwright-browser · by AndyShiuHeadless, reproducible browser automation with Playwright for any project — screenshots of web pages or local dev servers (desktop/tablet/mobile, full page or one element, single page or every page/menu of an app in one batch), frontend audits (console errors, failed requests, broken images/links, responsive overflow, axe accessibility, LCP/CLS performance), before/after visual comparison, scripted E2E flows (log in, click, fill, page through, assert), and logged-in pages via saved sessions. Use this whenever the user wants to screenshot or visually check a site, find frontend bugs, see how a page looks on mobile, compare the UI before and after a CSS/code change, reproduce a bug from an issue or ticket and capture evidence images for it, verify a UI flow works, or run/write a browser test — even if they never say "Playwright" or "browser". If Claude in Chrome could also do the job, briefly ask which to use (with a recommendation) instead of silently picking.★ 49 GitHub starsSkillRebuild a web page, sectionReplicaalbertirgi/replica · by albertirgiRebuild a web page, section, component or interaction from a reference (a live URL, a local HTML file, a screenshot or design export, or a screen recording or GIF) inside the user's own codebase. Then measure the rebuild against the reference (element boxes, computed styles, pixels, motion timing and easing) and iterate until a numeric Replica Score passes. Use when the user wants to clone, replicate, recreate, copy, port or match a site, landing page, hero, navbar, pricing table, card, modal, footer, hover effect, scroll reveal, page-load animation or any other UI, or to "make it look/feel/move like" one. Also use when they say "pixel-perfect", "1:1", "exactly like this" or "same as <url>", or hand over a screenshot, Figma export or video and ask to build it, including when they want their own copy, brand or extra features on top.★ 43 GitHub stars

More from emilkowalski

SkillReverse-lookup glossary that turns a vague descriptionAnimation vocabularyemilkowalski/skills · by emilkowalskiReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.★ 40.8k GitHub starsSkillApple's approach to interface design and fluidApple designemilkowalski/skills · by emilkowalskiApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.★ 40.8k GitHub starsSkillBuild an animation from scratchBuilding Animationsemilkowalski/skills · by emilkowalskiBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.★ 40.8k GitHub starsSkillBuild animations in React Native and ExpoBuilding Animations in Expoemilkowalski/skills · by emilkowalskiBuild animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.★ 40.8k GitHub starsSkillEncodes Emil Kowalski's philosophy on UI polishDesign Engineeringemilkowalski/skills · by emilkowalskiThis skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.★ 40.8k GitHub starsSkillSearch a codebase or UI for places that don't animate butFinding Animation Opportunitiesemilkowalski/skills · by emilkowalskiSearch a codebase or UI for places that don't animate but should, and reject everything that shouldn't. Read-only; it proposes motion with exact values, it does not implement it. Use when the user asks "what could be animated here?" or wants to "make this feel more alive". For fixing existing animations, use improve-animations or review-animations instead.★ 40.8k GitHub stars