Sub topic 14
Cross-browser and real-device checks
This chapter assumes you can open DevTools, read computed styles, and resize the viewport to check breakpoints, as covered in the earlier chapters. It adds the last layer of a visual QA pass: confirming that the page looks right in more than the browser you built it in.
Why one browser is not enough
A page can match the design in Chrome and still break elsewhere. Browsers use different rendering engines, and each engine has its own default styles, font rasterizer, and level of support for newer CSS.
| Engine | Common browsers | Typical visual differences |
|---|---|---|
| Blink | Chrome, Edge, Opera, Samsung Internet | Usually the reference for developers, so bugs here are found early |
| WebKit | Safari on macOS and every browser on iOS | Late support for some CSS features, different form control styling, viewport-height quirks on phones |
| Gecko | Firefox | Different default form styling, scrollbar handling, and some `font-feature` and `text-wrap` behavior |
On iOS, every browser must use WebKit. Chrome on an iPhone therefore renders like Safari, not like Chrome on a laptop. Testing "Chrome on iOS" does not add engine coverage.
The goal is not pixel identity across engines. The goal is that the design's intent survives: layout holds, text is readable, and states are visible.
Decide what to cover
You cannot test every browser and device. Pick a small matrix from real usage data.
- Check the project's analytics or the client's brief for the browsers and devices their users have.
- Cover each engine at least once: Blink, WebKit, Gecko.
- Include at least one real phone and, if possible, one real tablet.
- Record the exact versions you tested so a later pass can repeat them.
A practical minimum matrix for a consumer site:
| Target | Why it is included |
|---|---|
| Latest Chrome on desktop | Baseline, where most development happened |
| Latest Safari on macOS | Covers WebKit on desktop |
| Latest Firefox on desktop | Covers Gecko |
| Safari on a recent iPhone | Covers mobile WebKit and touch behavior |
| Chrome on a recent Android phone | Covers mobile Blink and a different font stack |
If the project has a browser support policy, that policy overrides this table. Do not report a bug in a browser the project has agreed not to support. Note it as out of scope instead.
Keep the comparison fair
The setup rules from earlier in the tutorial still apply. Differences you introduce yourself will look like bugs.
- Use the same viewport width in each browser. Compare at the design's widths, such as 375, 768 and 1280 px.
- Reset zoom to 100% in every browser.
- Check the device pixel ratio. A phone with a ratio of 3 will show images and 1 px borders differently from a 1x desktop monitor.
- Use the same page URL and the same data. A staging environment with different content produces false differences.
- Clear cache, or use a private window, so you do not see stale CSS.
- Turn off extensions that change pages, such as dark-mode or ad-blocking extensions.
What usually differs
Most cross-browser visual bugs fall into a few groups. Knowing them tells you where to look first.
Fonts
Fonts render with different weight and smoothing on macOS, Windows, iOS and Android. A slightly bolder or thinner look is normal. A different typeface is a bug.
Check these cases:
- A web font failed to load and a fallback font is showing. Open the Network panel and confirm the font file loaded.
- A fallback font has different metrics, so lines wrap in different places.
- Font weights were requested that the font file does not include, so the browser fakes bold.
Read the computed font-family value as shown in DevTools, then confirm the rendered font in the Fonts section of the Computed or Rendered Fonts pane, where your browser has one.
Form controls
Buttons, selects, checkboxes, date pickers and file inputs have the largest differences. Native controls look different in every engine. If the design shows a custom style, confirm the styling applies in each browser, including on iOS where some inputs gain default rounded corners and inner shadows.
Layout features
Modern layout features are widely supported, but behavior at the edges still varies. Look for:
gapon flexbox or grid, andaspect-ratio, where an older browser ignores them and spacing collapses.- Sticky positioning that stops working because a parent has
overflowset. - Scroll snapping and scrollbar width. Classic scrollbars take up space on Windows and are overlays on macOS and phones, so a layout that uses
100vwcan show a horizontal scrollbar on one and not the other.
Mobile viewport height
On phones, the address bar slides in and out. 100vh can be taller than the visible area, so a full-screen hero can push its button below the fold. Compare this on a real phone. The newer dvh, svh and lvh units address this, so check whether the build uses them.
Use the right tools for each device
Each option below trades cost against accuracy.
| Method | Accuracy | Good for | Limit |
|---|---|---|---|
| DevTools device mode | Low to medium | Layout at phone widths, touch emulation | Uses the desktop engine and fonts, so it does not reproduce Safari or real GPU behavior |
| Remote debugging a real device | High | Inspecting a real phone with DevTools | Needs a cable or network setup |
| Cloud device services | High | Many browsers and OS versions | Cost, and sessions can be slow |
| Your own devices | Highest | Touch, scrolling, real fonts, keyboard behavior | You only own a few |
Device mode in DevTools is a useful first filter. Never treat it as a substitute for a real phone. It cannot show the iOS address-bar behavior, the on-screen keyboard covering a form, or real font rendering.
Inspecting a real phone
You can still use the familiar inspector on a real device.
- For Android and Chrome: enable USB debugging on the phone, connect it, and open
chrome://inspecton the desktop. - For iPhone and Safari: enable Web Inspector in the iPhone's Safari advanced settings, then open the Develop menu in desktop Safari on a Mac and choose the device.
- Load the page on the phone and measure it with the same DevTools techniques you use on desktop.
If the page runs on your local machine, make the dev server reachable from the phone. A common way is to bind to all interfaces and use your computer's address on the local network.
# Start a static server reachable from other devices on the same network
python3 -m http.server 8000 --bind 0.0.0.0
# Then open http://<your-computer-ip>:8000 on the phoneBoth devices must be on the same network. Do this only on a network you trust, because the server exposes your files to others on it.
Automating the cross-browser pass
The Playwright check from the earlier chapter can run in all three engines. Add projects to the configuration. Each project is a browser plus a device profile.
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
{ name: 'mobile-safari', use: { ...devices['iPhone 13'] } },
{ name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
],
});Playwright stores a separate baseline image for each project, because the engines draw text differently. That is correct behavior, not a problem to fix. Review each baseline once by eye against the design before you accept it, since a baseline that already contains a bug will pass every later run.
Playwright's WebKit build is not identical to Safari on a Mac or iPhone, so it finds many problems but not all. Treat it as an early warning, and confirm anything important on a real device.
Triage cross-browser differences
Use the severity rules from the triage chapter. These questions help sort what you find:
- Does it block a task, such as a button hidden or text unreadable? That is high severity.
- Does the layout break at a supported width? That is high or medium.
- Is it a small difference in font smoothing, anti-aliasing or native control chrome? That is usually acceptable.
- Does it only appear in an unsupported browser? Record it as out of scope.
When you report a bug, state the browser, version, operating system, device, viewport size, and whether it also happens in a reference browser. A report that says "broken on Safari" cannot be reproduced. A report that says "Safari 17 on iPhone 13, 390 px wide: the hero button is below the fold" can.
A short worked example
You are checking a landing page. In Chrome at 390 px wide, the hero looks right. On an iPhone, the "Get started" button is hidden behind the address bar.
- Open the real phone's page through remote debugging.
- Inspect the hero element. Computed
heightis100vh, which is larger than the visible area on iOS. - Note that Chrome device mode did not show this, since it has no moving address bar.
- Report it with the device, browser version, width, a screenshot, and the suggested direction of using
100svh. - After the fix, retest on the same phone and in Android Chrome to make sure nothing else moved.
Common mistakes
- Treating DevTools device mode as a real device.
- Assuming Chrome on iOS uses Blink.
- Comparing screenshots from browsers with different zoom or pixel ratio.
- Reporting differences in native font smoothing as bugs.
- Not recording versions, so the next pass cannot reproduce the result.
- Accepting a baseline screenshot that already contains a defect.
Exercise
A tester reports that a full-screen hero looks correct in Chrome device mode at 390 px wide, but on a real iPhone the call-to-action button is cut off at the bottom. Name the likely cause, explain why device mode missed it, and give one fix to try.
Show answer
The hero is probably sized with 100vh. On iOS the address bar takes up part of the screen, and 100vh measures the larger area as if the bar were hidden, so the button falls below the visible area. Chrome device mode uses the desktop engine and has no moving mobile address bar, so it cannot show this. Try 100svh (or 100dvh) for the hero height, then retest on the real phone.
Exercise
Your Playwright run in the webkit project fails a screenshot comparison on a heading, with a very small difference along the text edges. The same page passes in chromium. List two steps to decide whether this is a real bug.
Show answer
First, view the diff image and compare the heading with the design: check the font family, size, weight and line height with computed styles. If they match, the difference is only anti-aliasing and is an accepted difference, so you can keep a separate WebKit baseline. Second, confirm the font file loaded in WebKit (Network panel or a real Safari check). If a fallback font is showing, or the heading wraps differently, it is a real bug and should be reported with browser, version and width.