DEV Community

Discussion on: Which units of measure do you use and why in CSS?

Collapse
 
jwkicklighter profile image
Jordan Kicklighter

I see a lot of people only using rem or only using px, but I tend to use a hybrid approach.

Base font size on the body is in px. Every other font size is rem to it scales based on my chosen base. Padding and margin is usually px throughout the app, but I suppose that setting base padding and margin in px and using rem could apply here too.

Collapse
 
coolshaurya profile image
Shaurya

Using base padding and margin isn't such a good idea as in most projects you reset the body padding and margin to 0.