Please stop using px for font-size.
๐ฅ Learn how to build a responsive website from a Figma design with HTML, SCSS, JS โก๏ธ https://coder-coder.com/responsive/
๐ Join the Coder Coder Club for $5/mth and get sneak peeks of videos: https://courses.coder-coder.com/p/club
What CSS unit should you use for font size? In this video, I'll show you why you should not use the px unit for font-size, width, and height of elements. The px unit is not affected by the browser's base font size, and so is not accessible for users who want to increase the font-size by using that browser setting. For accessibility, it's better to use rem or em unโฆ
Watch on YouTube โ
(saves to browser)
Chapters (6)
Intro
0:23
The problem with px
3:28
Don't use px for widths
5:32
Don't use px in media queries
9:03
Ways to convert from px to rems
12:20
What about the 62.5% hack?
DeepCamp AI