gitpoint / git-point

GitHub in your pocket :iphone:
https://gitpoint.co/
MIT License
4.73k stars 788 forks source link

Responsive font sizes #267

Open lex111 opened 7 years ago

lex111 commented 7 years ago

Now the font size is specified in pixels, which means that on large screens (even on a 7-inch tablet) the text looks shallow, although it can be done to increase it proportionally?

That's what I found such a solution. Any other thoughts?

housseindjirdeh commented 7 years ago

So I am taking advantage of PixelRatio by using a file that care of normalizing text: https://github.com/gitpoint/git-point/blob/master/src/config/normalize-text.js

You may have noticed that everywhere in the app where fontSize is being used: I always specify normalize in order to make sure it shows decently in different screen sizes.

However are you still seeing things weird on a 7 inch tablet? Most definitely means we'll need to investigate that file and see if it's normalizing like it should in that case :mag:

lex111 commented 7 years ago

I noticed this, but it still feels like the text is given in pixels, so on large screens it looks small.

housseindjirdeh commented 7 years ago

Cheers okay definitely worth investigating on larger screen sizes and making sure text is rendered nicely.

bhaveshc20 commented 7 years ago

You can use "calc(0.75em + 1vmin)". I've been using it on my website and it works perfectly well.