Are the sizes of CSS elements in EM still modern?

I still use EM in CSS to indicate the sizes of elements in my templates.

Today, most browsers can properly scale websites that are listed in PX.

My argument for using EM was / is: if a person who has a visual impairment and changes the basic font size in the browser, the design is still suitable.

I ask, because for me there is still a source of errors for using EM. When I specify a different font size and then the base font size on the element, I often forget to adapt my EM calculation for child elements.

Now I have 2 questions:

  • How do people with disabilities target the browser (do they use browser scale or do they still change the base font size)?

  • Does it make sense to use EM for element sizes now?

+6
the css accessibility
source share
3 answers
  • Based on what I read, no. People with mild or moderate degree of difficulty of frequently used applications, different from the UA RU, for zooming. These tools can enhance all or part of the display, but (in my limited experience), they do not increase the text regardless of the setting.

  • It still makes sense to use "em". First of all, accessibility is not the only reason for using "ems". I think that the model of inheritance relative size makes more sense with ems and percentages, than with the pixels. Secondly, you can make calculations in the of CSS3, if you do not have to remember to adapt your calculations.

refs:

+8
source share

Physical dimensions (px) are usually worse than logical ones (pt, em,%), since the size and resolution of physical devices can vary greatly (from a small tube to the desktop screen to the wall plasma screen). If you are not attached to the part of the bitmap graphics, there should be no shortage of determining the size in logical units.

If you always specify the font size as a percentage of the base size, it is more difficult to forget to use logical units :) Also, the user can simply specify the size of the base font in the browser, and your whole design will automatically adapt.

When the font size is too small to read, I zoom in a bit. I also ask a rather large database page size for Japanese, so I can see the glyphs. But if the page resists to adapt to changing the font, I usually just click the "Readability" bookmarklet, and the disruptive design completely disappears.

+1
source share

I still support the use of EM as a unit. But, as you said, the modern scale of the browser is very well suited even for other devices.

I think the most important thing - to always use the same one on the website. Until you start mixing different units, the browser should do well.

The only real advantage that I now see in using EM is that someone who has increased the default font size will see your site with larger elements without doing anything. If you use PX, the person may have to manually resize.

0
source share

All Articles