Optimal maximum resolution for displaying content in mobile mode

Asked

Viewed 5,919 times

8

Taking as an example the Bootstrap 4 grid system whose classes treat the content with breakpoints specific according to the screen width resolution of the device (considering the viewport as container):

inserir a descrição da imagem aqui

My question is this::

There is an ideal maximum resolution recommended (or what is the maximum recommended resolution) to handle the content of the page in mobile format (collapsing menu, having widest elements below each other etc.) so that there is a better ratio user experience/device used?

That is, until X pixels screen width, it is more recommended to dispose the contents in mobile mode, taking into account better visualization (image and text size) on mobile devices (tablets and smartphones) or even desktops with low resolution monitors (e.g., netbooks, small monitors). Also consider high-resolution smartphones and tablets. This is because if the page is displayed on desktop mode on a higher resolution smartphone, the elements can get very small on the screen, impairing viewing.

1 answer

16


I don’t think you have a single answer to your question. Most of it can be answered with this other question What is the difference between "Css Resolution" and "Pixel Resolution" where vc can better see what the difference is between high and low density screens and how we can treat CSS using media queries rules such as

@media (min-resolution: 2dppx) { ... } /* regra css para telas com 2x a densidade de  pixel */
@media (min-resolution: 3dppx) { ... } /* regra css para telas com 3x a densidade de pixel */

Another part of the answer may be based on typographical and UX concepts, where some good practices can be followed. As it does not have very long text lines, for example a text line with more than 14 words, or a very wide inputs, but the user will insert only a few characters.

The ideal is to have up to 14 words per line. But how will you treat this on a monitor that is 2,500px wide? Probably you will need to "break" the text in 2 columns or more.

inserir a descrição da imagem aqui

Another point is that usually on the desktop if it is close to the screen, in the mobile closer still then the font-size doesn’t have to be so big. Already on a presentation screen or TV you are already far away and the font-size needs to be treated, independent of screen resolution.

inserir a descrição da imagem aqui

On the images the ideal is to use the SRCSET https://developer.mozilla.org/en-US/docs/Aprender/HTML/Multimedia_and_embedding/Responsive_images

<img srcset="imagem-320w.jpg 320w,
             imagem-480w.jpg 480w,
             imaem-800w.jpg 800w"
     sizes="(max-width: 320px) 280px,
            (max-width: 480px) 440px,
            800px"
     src="imagem-800w.jpg" alt="">

inserir a descrição da imagem aqui

For Bootstrap it would be something like this

1 - If you are using Bootstrap with the default Grid you theoretically would need the images in these resolutions. Here is the official documentation: https://getbootstrap.com/docs/4.0/layout/grid/

$grid-breakpoints: (
  // Extra small screen / phone
  xs: 0,
  // Small screen / phone
  sm: 576px,
  // Medium screen / tablet
  md: 768px,
  // Large screen / desktop
  lg: 992px,
  // Extra large screen / wide desktop
  xl: 1200px
);

2 - To load the images with each of the grid resolutions would look something like this:

<picture>
    <source media="(min-width: 576px)" srcset="suaimagem-sm.png"/>
    <source media="(min-width: 768px)" srcset="suaimagem-md.png"/>
    <source media="(min-width: 992px)" srcset="suaimagem-lg.png"/>
    <source media="(min-width: 1200px)" srcset="suaimagem-lx.png"/>
    <img src="suaimagem-md.png" alt="">
<picture>

Another option would be you having a stylesheet for mobile.css and one for desktop.css, and identifying the type of access device by JS you use a sheet or another. One option is to use direct from the attribute media of link of css.

<link rel="stylesheet" href="mobile.css" media="screen and (max-width: 768px)" />
<link rel="stylesheet" href="desktop.css" media="screen and (min-width: 769px)" />

But this technique if the device is mobile, but has more than 768px width, the user will end up loading the sheet desktop.css even being on mobile... There is an approach recognizing the user-agent device by JS is better.

One thing that can help is trying to do Media Queries that take the orientation of the device if it is portrait or landscape.

And His @media would look something like this for example:

@media all and (orientation: portrait) { ... }

@media (min-width: 700px) and (orientation: landscape) { ... }

inserir a descrição da imagem aqui

You can read more about CSS and device guidance here: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/CSS_Media_queries#orientation


Breakpoint

About the "Breaking Points" (break points of the layout) nor the Google or the Mozilla make references to this in their documentation. In fact what they recommend and use of Meta Viewport and treat the layout in a way that is responsive and accessible.

Follow official links with good practices.

Nor is there much consensus among the Frameworks Design System most famous as Bootstrap, Materialize and Foundation!

Note below that each of them determines a different width for the Breaking Points of Grid who use.

Bootstrap3 Breaking Points

inserir a descrição da imagem aqui


Bootstrap4 Breaking Points

inserir a descrição da imagem aqui


Materialize Breaking Points

inserir a descrição da imagem aqui


Foundation Breaking Points

inserir a descrição da imagem aqui


And to finish here is an excellent article about the most used screen sizes currently, the data are from December 2017. Article: https://www.hobo-web.co.uk/best-screen-size/

Telas Desktop

  • 1366 768 - 29.25%
  • 1920 1080 - 17.34%
  • 1440 900 - 7.32%
  • 1600 900 - 5.72%
  • 1280 800 - 5.27%
  • 1280 1024 - 4.51%

inserir a descrição da imagem aqui

Telas Mobile

  • 360 640 - 41.11%
  • 375 667 - 9.58%
  • 720 1280 - 5.16%
  • 320 568 - 4.55%
  • 414 736 - 3.79%
  • 320 534 - 3.46%

inserir a descrição da imagem aqui

Telas Tabler

  • 768 1024 - 57.99%
  • 1280 800 - 5.89%
  • 600 1024 - 4.6%
  • 601 962 - 3.02%
  • 800 1280 - 2.94%
  • 1024 600 - 2.36%

inserir a descrição da imagem aqui

Source: http://gs.statcounter.com/screen-resolution-stats/tablet/worldwide

OBS: Always consider your target audience and user experience before you begin development!

I don’t know if I touched all the dots, but I believe I have something to shed some light on.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.