Welcome to the Treehouse Community
Looking to learn something new?
Dennis Brown28,742 Points
Is Rem's ability to ignore compound Em's just an overlay for the parent element?
So I was looking at what was happening in Dev Tools, and played around with some of the CSS elements to see and make changes on the fly. I of course noticed that the rem was disabling the Em, great!
I also noticed that when I manually disabled the main-header em, a space above the span element text (.title), disappeared. If I was to increase the em size, that space became larger as if it was there "just in case" to cater to the em text size. Removing or reducing the main-header em value to 1em removed this "padding" of sorts as well.
So is rem simply overlaying the space, and the line space needed for the em is there to cater to it if it is needed? If so, what is the common practice to make sure that you do not add too much padding, or none at all from rem replacements?
This is really easy to see when setting main-header to 3 or 4em, but after that it becomes quite obvious with anything above 1em.