Please stop using px for font-size.
Skills:
UI Design70%
๐ฅ 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 units
0:00 - 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?
Resources mentioned in video:
๐ GitHub repo: https://github.com/thecodercoder/stop-using-pixels
๐ฅ๏ธ MDN notes on pixels and font-size -- https://developer.mozilla.org/en-US/docs/Web/CSS/font-size#pixels
โ๏ธ WCAG Resize Text standards -- https://www.w3.org/WAI/WCAG22/quickref/#resize-text
โ๏ธ Josh Comeau, "The Surprising Truth About Pixels and Accessibility" -- https://www.joshwcomeau.com/css/surprising-truth-about-pixels-and-accessibility/#the-sixtwofive-trick-13
____________________________
โ๏ธ Want to get emails about new videos, course sales, and other web dev news? Sign up here: https://coder-coder.com/subscribe/
๐ Get my hoodie here: https://coder-coder.com/merch
๐ป Become a full-stack web dev with Zero to Mastery: https://academy.zerotomastery.io/a/aff_338z7xnj/external?affcode=441520_ti97uk6b
๐จ Get my VS Code theme: https://marketplace.visualstudio.com/items?itemName=CoderCoder.codercoder-dark-theme
๐ฝ FOLLOW CODER CODER
Twitter -- https://twitter.com/thecodercoder
Instagram -- https://www.instagram.com/thecodercoder
#css #javascript #html
Watch on YouTube โ
(saves to browser)
Sign in to unlock AI tutor explanation ยท โก30
Playlist
Uploads from Coder Coder ยท Coder Coder ยท 0 of 60
โ Previous
Next โ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How to Make a Super Simple HTML Website [Tutorial]
Coder Coder
How to make an animated sticky header with CSS and JavaScript!
Coder Coder
How to get coding help by researching online
Coder Coder
IG Live - Advice for beginner web developers
Coder Coder
Quick Start Guide to Parcel JS
Coder Coder
Build a responsive website with HTML & CSS - Part 1 [Live Coding]
Coder Coder
Build a custom Linktree page for Instagram with HTML & CSS
Coder Coder
Gulp 4 Crash Course for Beginners
Coder Coder
How to use CSS position to layout a website
Coder Coder
CSS: 4 Reasons Your Z-Index Isn't Working
Coder Coder
Coding a landing page website with HTML & CSS
Coder Coder
Learn web development as an absolute beginner
Coder Coder
How to write media queries in CSS
Coder Coder
How to build a 2-column layout using flexbox | HTML/CSS
Coder Coder
How to build a simple responsive layout with CSS grid
Coder Coder
Write code faster in VS Code with Emmet shortcuts
Coder Coder
How I setup VS Code for a beginners front-end workflow
Coder Coder
How to make a background-image transparent in CSS
Coder Coder
Build a responsive website from scratch with HTML & CSS | Part 1: Navigation bar
Coder Coder
Animated Hamburger Menu in CSS/JS | Build a responsive website from scratch (Part 2)
Coder Coder
Animated mobile menu with CSS/JS | Build a responsive website from scratch (Part 3)
Coder Coder
How to stay motivated when learning to code?
Coder Coder
Responsive hero | Build a responsive website from scratch (Part 4)
Coder Coder
Responsive 4-column layout with flexbox | Build a responsive website from scratch (Part 5)
Coder Coder
Responsive 4-column layout with CSS Grid | Build a responsive website from scratch (Part 6)
Coder Coder
Building a footer using CSS Grid | Build a responsive website from scratch (Part 7)
Coder Coder
Browsersync + Sass + Gulp in 15 minutes
Coder Coder
Responsive card UI with flexbox and hover effects | HTML/CSS
Coder Coder
CSS grid cards with animated hover effect | HTML/CSS
Coder Coder
How I learned to code and landed a job (no CS degree!)
Coder Coder
Building the website for my course (coding timelapse)
Coder Coder
How to debug your code faster ๐ฅ
Coder Coder
Full timelapse + walkthrough of building my website
Coder Coder
Your questions answered!! โจ100K Q&Aโจ
Coder Coder
Building a pricing block with HTML & PuRe CSS
Coder Coder
Use the Google Maps API to build a custom map with markers
Coder Coder
Building an accordion with HTML, CSS & JS (Part 1)
Coder Coder
How to make your own VS Code theme!
Coder Coder
How to build an accordion with HTML, CSS, and JavaScript (Part 2)
Coder Coder
Life/channel update
Coder Coder
Building a Light/Dark Dashboard, Part 1
Coder Coder
What is NPM, and why do we need it? | Tutorial for beginners
Coder Coder
Building a Node.js app (as a JavaScript noob) | ๐ด LIVE CODING
Coder Coder
Free website project ideas for your portfolio #shorts
Coder Coder
How to add quickly emojis on Windows #shorts
Coder Coder
Building a Light/Dark Dashboard, Part 2
Coder Coder
Learn to code with these 4 free resources! #shorts
Coder Coder
Learn flexbox with these 4 resources! #shorts
Coder Coder
[Typing sound] Comparing mechanical vs regular keyboard
Coder Coder
Building a Light/Dark Dashboard, Part 3
Coder Coder
what making web development tutorials is really like ๐
#shorts
Coder Coder
Generate website starter files with just one command!
Coder Coder
emojis in code
Coder Coder
Stay motivated when coding: don't compare yourself with others #shorts
Coder Coder
Building a Light/Dark Dashboard, Part 4
Coder Coder
Coding motivation: slow and steady wins the race ๐ข๐
Coder Coder
Sass @import is being replaced with @use and @forward
Coder Coder
Coding motivation tip: keep your goal in mind
Coder Coder
How do websites work?
Coder Coder
Building a Light/Dark Dashboard, Part 5
Coder Coder
More on: UI Design
View skill โRelated AI Lessons
โก
โก
โก
โก
The Designerโs Secret Weapon: Advanced AI Tools Thatโll Change How You Work Forever
Medium ยท UX Design
AI Is Not Replacing Designers, Itโs Giving Them a Superpower
Medium ยท AI
AI Is Not Replacing Designers, Itโs Giving Them a Superpower
Medium ยท UX Design
Instagram Instants Is a UX Disaster With a Good Idea Trapped Inside
Medium ยท UX Design
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?
๐
Tutor Explanation
DeepCamp AI