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
padding.

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.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com




> 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
> http://l-c-n.com/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: