Yesterday I created a lightning speed Short to tell you why using REM instead of pixels is super important: • Why you (almost) alway...
That video however, was a bit too tightly packed with information. So I decided to turn it into a main video, explaining this important topic in way more detail.
Using REM for main sizes like fonts, margins, paddings, etc is very important for accessibility. By using REM instead of pixels, your sizes will all scale when a visually impaired user sets a custom base font for their browser. This way, these people are also able to enjoy the web the way they deserve!
Let me know in the comments as soon as you've implemented it in your own project!
👀 Timestamps
00:00 - Intro
00:38 - Why you've used pixels until now
01:00 - Why pixels are wrong
02:16 - Changing our code to use REM
03:16 - Making your HTML node percentage based
04:16 - Exceptions to using REM
05:08 - How about EM?
07:48 - Outro
💬 Join us on Discord: www.frontend.fyi/discord
🐦 Follow me on Twitter: / frontend_fyi & / jeroenreumkens
👨🏫 Check my mentorships: www.jeroenreumkens.nl/mentoring
#css #html #accessibility #frontend #frontendfyi
1 авг 2024