ecss icon indicating copy to clipboard operation
ecss copied to clipboard

ECSS and em units

Open juliami opened this issue 10 years ago • 2 comments

Hi Ben,

First - thanks your for your amazing work. The advantages of ECSS cannot be stressed enough.

I was wondering what's your approach towards the relative units like em. They are inheritance dependent, so should they be used in the modular architecture?

Regards, Julia

juliami avatar Oct 14 '16 09:10 juliami

Hi, thanks for the kind words and glad ECSS is proving useful. 👍

I think ems are fine for modular work as long as the root of your component is set in a non compounding length unit e.g. rem/px.

In practice this just means using rem or px at the root of your component and then use em within if it suits your needs.

Two good reads on approaches similar to this:

http://simurai.com/blog/2013/07/03/sizing-components https://css-tricks.com/rems-ems/

However, I also make the argument in some circumstances for just using pixels ;)

https://benfrain.com/just-use-pixels/

benfrain avatar Oct 14 '16 15:10 benfrain

Hi @juliami I'm closing this one down. If you have any further queries on this feel free to comment and I can open back up 👍

benfrain avatar Nov 23 '16 14:11 benfrain