Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
James Page
9,621 PointsWhat are the reasons to not use em units for transform values?
I'm thinking that if you want to maintain transformations in proportion to text and across different viewport sizes, ems would be suitable, wouldn't they? Especially if the transformed item is something like an SVG?
1 Answer
Kristjan Reinsberg
50,960 PointsIf you set BODY font size like 16px and then YOU SET some size to all other element font sizes with em.
NOW LETS SAY YOU WANT TO MAKE ALL TEXTS SMALLER/BIGGER onmobile/tablet/pc
you only have to change BODY font size and all others scale them self.
EM is like saying MULTIPLY BY
Example 1.5 em = multiply my body font size by 1.5x
(if your body size was 16px then 1.5 em will be 16px * 1,5 = 24px; )
I hate reading BUT THIS IS MUST READ http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/