Web pages small screens

Watch out for this: Easy Librem 5 App Development: Scale the Screen however.

Unless the web browser specifically lies about the width, looking at the display width won’t work if the user has had to choose no-scaling in order to run other applications - until such time as it all adapts automatically, as discussed in the above topic.

Looking at the width in pixels isn’t really the right approach. You want to know the width in real world units. That’s what a small screen really means.

I note that Safari on the spiPhone definitely lies about the width but I have no insight into where that is being implemented.

Another fun aspect is automatic rotation i.e. display rotates depending on whether the phone is being held landscape or portrait, or for that matter manual rotation. (I have no idea whether automatic rotation is even working yet on the L5 but presumably it will be in the future if not now.) If you depend on the width then you need to decide whether to depend on the orientation-dependent width (i.e. different if rotated) or some arbitrary orientation-independent width.

Who knows what you do with convergence e.g. mirroring phone display on external monitor.