- Open the following HTML in Safari on any iPhone:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width
initial-scale=1.0
user-scalable=no" />
</head>
<body>
<div>Responsive design</div>
</body>
</html>
The things are rendered correctly: we have the same font size in portrait mode (viewport width = 320px for iPhone 5) and landscape mode (viewport width = 568px for iPhone 5).
- Replace the text
Responsive design
with something likeResponsive <!-- really? --> design
(or some other tags, or add another simple div). See the difference???
It's rendered as if the viewport was 320px!
It's the most simple example. In some more complicated cases, I created several divs with correct font size on one page, but other divs' font was still incorrect.
No matter what the font is. You can use e.g. div { font: 20px Helvetica; }
Tested on:
- the latest iOS 9.2.1 (device) — Safari, Chrome and other Safari-based browsers
- iOS 7.1 / 8.4 / 9.2 simulators — Safari
The same issue... Is it a bug? or a feature? Why it's present there for years?
There's no such problem on iPad.