Josh Collinsworth 10/28/2022

Why you should never use px to set font-size in CSS

Read Original

This article debunks the misconception that px, em, and rem units are functionally the same in CSS. It details how using px for font-size can override user browser settings and accessibility preferences, potentially making websites harder to use. The post explains the technical behavior of these units and strongly recommends using relative units (em/rem) for font sizes to create more accessible and resilient web designs.

Why you should never use px to set font-size in CSS

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week