I understood that 2em doubled the size of the font that the element was calculated to have. But in this case, it doesn't seem to be working like that.
(On Chrome)
Styles
<style>
p {
font-size: 24px;
}
.go-big {
font-size: 2em;
}
</style>
HTML
<p>This should be 24 px</px>
<p class="go-big">This should be 48 px?</px>
I have a working example here: https://stackblitz.com/edit/js-em-question-deborahk
Since the <p> element style is set to 24px, I would assume that adding a class with a font-size of 2em would double the font size to 48px. But it instead seems to double the default font size of 16 to 32px.
Is this a bug? Or something in the way these styles are inherited?