DEV Community

Discussion on: 🛑 Stop using pixels in CSS

Collapse
 
dailydevtips1 profile image
Chris Bongers

I don't think that's the point, it's more about using rem or em, I personally use rem, but em would work just as well.

I do thank you for this detailed explanation, wasn't aware of these points in rem vs em.

So is there any case that you still use pixels?
(Media-queries/borders?)

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

Yup! I still use pixels for borders and border radii. I also use them for media queries, though it really depends on where the breakpoint falls. If it falls within a screen width where my font is still scaling up/down responsively between two extremes that I've set up, then I'll use pixels to be more precise.

Thread Thread
 
dailydevtips1 profile image
Chris Bongers

Oke makes sense yes!