Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
What is the best unit to use in Mediaqueries? - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
3y ago
•
17 replies
ZeR0ByTe
What is the best unit to use in Mediaqueries?
I would like to know what do you suggest to mediaqueries
?
I
'm using this
, its ok
?
?
?
$breakpoint
-xxs
: 19
.999rem
;
/
/ 319
,98px
$breakpoint
-xs
: 35
.999rem
;
/
/ 575
,98px
$breakpoint
-sm
: 47
.999rem
;
/
/ 767
,98px
$breakpoint
-md
: 59
.999rem
;
/
/ 959
,98px
$breakpoint
-lg
: 74
.999rem
;
/
/ 1199
,98px
$breakpoint
-xl
: 87
.499rem
;
/
/ 1399
,98px
But I don
't know If It
's better use EM or PX directly
.
I never use EM but I read this article and now I
'm more confused
https://zellwk.com/blog/media-query-units/
Thanks
PX, EM or REM Media Queries? | Zell Liew
Have you wondered if you should use
px
px
,
em
em
or
rem
rem
for media queries
? I had the same question too
, and I never figured it out
, not till now
.
When I first created the
mappy
-breakpoint
library
, I used
rem
rem
units
. Then
after a conversation
with Sam Richard
, I quickly switched to
em
em
instead because I found out there isn
't a differen
.
.
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Best use cases for the "lh" unit
KP-C
Kevin Powell - Community / front-end
2y ago
What is the best property to use when it comes to text responsiveness?
KP-C
Kevin Powell - Community / front-end
4y ago
What's the best way to use grid or flexbox?
KP-C
Kevin Powell - Community / front-end
3y ago