My web app, shown in image 1, looks great on most devices. However, when it is launched on a mobile with a notch, like in image 2, a layout problem arises. Using a "safe area" won't work for me because some of my pages need to be fixed at the top, similar to image 3.
The issue can be easily resolved by adding media queries to add padding above the content on an iPhone X, but other smartphones also have notches.
Is there a JavaScript method available to detect mobiles with a notch (and preferably return its height)? If not, what is the best way to address this problem? Do I need to create media queries for every smartphone model?