DEV Community

Discussion on: 🛑 Stop using pixels in CSS

Collapse
 
xowap profile image
Rémy 🤖

I don't get the point. If your media queries are in pixels because the screen has pixels and the designs were made in pixels, what's the point of converting? Browsers can zoom, desktops have system-wide magnification settings. Is it still relevant in 2020?

Collapse
 
alvaromontoro profile image
Alvaro Montoro • Edited

It is. Browsers have the option to set a default font size (without having to increase the page zoom). Out of the box it is 16px in most browsers, but users can override it to any value. If developers code with px values, the user-set value does not apply and the user experience is impacted.

Collapse
 
dailydevtips1 profile image
Chris Bongers

Exactly and some mobile devices/screen readers choose to show a bigger font by default, hence where our pixels would not be relevant.