0

My understanding of Material-UI 4's responsive font scaling is that it takes the "screen" width and scales font sizes based on certain breakpoints. However, I don't explicitly call responsiveFontSizes() for my theme, so maybe I'm wrongly assuming that responsive font scaling is involved then this is rather viewport initial scaling? At the moment, I'm using the usual <meta name="viewport" content="width=device-width, initial-scale=1" />.

The unfortunate outcome is that the same app when viewed on a tablet in landscape mode has significantly larger fonts compared to when viewing the app in portrait mode. This is especially prominent on common 19:10 screens (10:19 in portrait).

How can I set Material-UI's responsive font scaling based on the shorter dimension of the viewport, so that rotating the viewport doesn't result in ugly font size upscaling?

TheDiveO
  • 2,183
  • 2
  • 19
  • 38
  • Note: HTML does not use and does not need or require a closing slash on any tag and never has in any HTML specification. – Rob Dec 26 '20 at 13:01
  • can you then please open a bug report on the CRA template: https://github.com/facebook/create-react-app/blob/master/packages/cra-template-typescript/template/public/index.html#L6 – TheDiveO Dec 26 '20 at 15:26
  • btw, https://stackoverflow.com/a/21898502 – TheDiveO Dec 26 '20 at 22:33
  • Yes, it is allowed, but that doesn't change anything I said. It has no meaning, does nothing, and browsers are instructed to ignore it. – Rob Dec 26 '20 at 23:02
  • Allowing self-terminating elements often make markup generators and generation much simpler and uniform, so what's your problem with self-closing that you need to even to mention it with such verve? – TheDiveO Dec 26 '20 at 23:28
  • I don't know how it would make it easier? It's a XML thing and people have complained about having to keep track of closing slashes for years. My point, however, is that putting irrelevant, unnecessary, ignored, do-nothing characters into your HTML makes no sense. It's like putting two periods at the end of a sentence. Why would you do that. Just because you can? – Rob Dec 26 '20 at 23:35

0 Answers0