Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use rem unit beyond font-size?

Tags:

css

I know rem unit is well accepted among browsers http://caniuse.com/#search=rem when it comes to font-size property. However, i'm wondering about other properties like padding, margin or even something less common like outline and letter-spacing. Is it safe to use rem on that?

like image 637
Daniel Avatar asked Mar 25 '23 03:03

Daniel


1 Answers

Yes. Rem units can be used anywhere where a regular length value is allowed. The exception is that IE9–10 have a bug where a rem value can't be used in the font shorthand, but it can be used in the individual font-size property.

like image 129
David Storey Avatar answered Apr 02 '23 13:04

David Storey