Previous Message
Next Message

is use of rem bad?

Sent by Karl DeSaulniers on 21 July 2016 08:08

Ok, gotcha!
In my experience, em plays the same part as percent with regards to height, width, margins and
padding etc.
So I usually stick to percent on those. If I need a defined size, I just use px such as min-width or

For my fonts, I use 100% body and em everywhere else with minor px settings for consistency on some
input elements and such or on purpose. 
Makes for a good "responsive" setup I have found.


Karl DeSaulniers
Design Drumm

> On Jul 21, 2016, at 2:01 AM, Philippe Wittenbergh [EMAIL-REMOVED]> wrote:
> Oh, sure, that is inheritance at work. For any other property that accepts a `<length>`, if it is
expressed using the `em` unit, it will depend on the computed value of the element itself.
> That means (to come back to the rem vs em topic) that the resulting value for padding, border,
margin, background-position, etc are depending on the nesting inside the document tree if using `em`
units. The `rem` unit avoids that.
> Philippe
> --
> Philippe Wittenbergh

css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
List policies --
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: