chapter icon indicating copy to clipboard operation
chapter copied to clipboard

Font scaling for different resolution screens (laptop/desktop specifically)

Open srprkr opened this issue 7 years ago • 8 comments

Any thoughts on how we'll handle supporting different resolution screens? In my experience, using px everywhere can result in vastly different UX for users on various desktop reolutions.

I propose we set different font-size: **px in each breakpoint in an html selector, then use rem units everywhere else. Does Material UI (or any other tool in the stack) have a built in way to handle this?

Are there other recommendations?

srprkr avatar Oct 30 '19 18:10 srprkr

@SeanRParker We can handle them through media queries. Just for an example: we can set up a global font-size of 18px and use rem everywhere. And suppose when a user is using a device of width below 500px, we can alter the global font-size to 16px. This will reflect the change in all the components.

How does that sound?

vkWeb avatar Oct 30 '19 21:10 vkWeb

It's typically not a good idea to set a base font size in px for accessibility reasons - impaired users (and anyone who wants to) should be able to change their browser's base font size and have it be reflected in Chapter's site. One option is to set the base font size to 1.125 rem on larger screens and 1 rem on smaller screen, which will respond to font size changes while still giving the effect we want.

On a side note, I've been sick and unable to do anything programming-related. I'm finally recovering and I'll start popping up again.

kognise avatar Oct 30 '19 23:10 kognise

@kognise Yes, I think you are right. It's good to see you back. I hope you recover soon :)

vkWeb avatar Oct 30 '19 23:10 vkWeb

@vkWeb That's the approach I have in mind.

@kognise Good point. I didn't know that. Hope you feel better soon.

srprkr avatar Nov 01 '19 19:11 srprkr

Is there anywhere we should link this conversation?

Is this discussion resolved, or shall we keep it open?

allella avatar Nov 07 '19 04:11 allella

@vkWeb @SeanRParker @kognise https://material-ui.com/customization/typography/#font-size

nik-john avatar Nov 07 '19 05:11 nik-john

@nik-john The responsive font-sizes looks cool to me: https://material-ui.com/customization/typography/#responsive-font-sizes

By the way, in our prototype, we are using a different set of font-sizes. We are using the below colors and font-sizes for our prototype. It can be adjusted though.

Colors: 
Primary: #0a0a23 (gray 90) Icon color: #d0d0d5

Font-sizes: base body text: 16px h1: 38px h2: 28px h3, event card title: 22px small: 14px

vkWeb avatar Nov 07 '19 13:11 vkWeb

Looks like it’s built in to Material-UI.

So I’m going to close this issue.

srprkr avatar Nov 07 '19 16:11 srprkr