# WebKit and iPhone Form Checklist
A form can look right in desktop Chrome and be broken on every iPhone, because every browser on an
iPhone runs Apple's WebKit and iOS restyles some form controls after your CSS has run. This file is a
pass over your own code: what to grep for, what to measure, how to test without a Mac, what passes and
what fails, the CSS that fixes each problem, and a prompt you can hand an AI coding agent.
Version 1.0, 2026-09-23. Source article:
https://jwatte.com/blog/iphone-date-fields-stick-out-webkit-fix/
---
## 0. How to use this file
Three facts come before any check.
1. **Every browser on an iPhone is WebKit.** Safari, Chrome, Firefox, Edge and the browsers inside
social apps all use Apple's engine (App Review Guideline 2.5.6). Apple allows other engines for
users in the EU (iOS 17.4 and later) and Japan (iOS 26.2 and later), but as of September 2026 no
major browser ships one. "It works in Chrome" on a desktop tells you nothing about Chrome on an
iPhone.
2. **Playwright's WebKit is not iOS.** Playwright ships WebKit for Linux, Windows and macOS. The
iOS code that causes the problems below never runs in any of them. On Windows, Playwright's
WebKit 26.4 build does not even have a date control: an `` reports its `type`
as `"text"`.
3. **A desktop browser at phone width is not a phone.** It is also not always at phone width. Before
you trust anything you see, run `document.documentElement.clientWidth` in the console and check
it reads 320 to 430.
Work through it in this order:
- [ ] Section 1: grep your templates and stylesheets (about ten minutes)
- [ ] Section 2: know the numbers that decide pass and fail
- [ ] Section 3: run the Playwright script at four phone widths, before you change anything
- [ ] Section 4: apply the fixes for what failed
- [ ] Section 3 again: the same script, after
- [ ] Section 5: one pass on a real iPhone, which is the only real confirmation
- [ ] Section 6: the prompt, if you want an AI coding agent to do sections 1 to 4 for you
---
## 1. Grep your code
The commands are for bash or zsh with ripgrep (`rg`), which skips whatever your `.gitignore` skips.
Run them from the project root. Each one ends in `.` on purpose: with no path, `rg` searches
standard input instead of the folder when standard input is a pipe, which is how many AI agents'
shells run commands, and it sits there waiting. A hit is a lead, not a verdict: the script in section 3 measures what actually
renders.
```bash
# 1a. Date and time inputs, in HTML, templates and JSX
rg -n "type=[\"']?(date|time|datetime-local|month|week)\b" .
# 1b. Does any appearance: none reach them? Compare the selectors against the classes 1a found.
# No file filter: inline