Search code examples
cssfont-sizeretina

Calculating CSS font-size for mobile


I have to calculate correct font-size for mobile. The mock-up guide I'm getting is the size of the real resolution of an iPhone 5 (640x1136). Tinkering with it, I soon realized I have to divide any value in the guide by 2, to get the correct logical font-size. Consider meta tag viewport present in HTML.

Is this a correct approach?


Solution

  • Yes, this is a good approach because the it is the retina screen which is actually the double of the normal resolution. like for Iphone6 we have the retina screen of 750 * 1334. But when we inspect it shows 375 * 667 so therefor it is a good approach to divide by two if mockups are provided according to retina screen.