Why h1-h6(headings) are different size when the font-size is declared on the parent element? using rem unit?
HTML:
<div class="parent">
<h1 class="child">Hello World</h1>
</div>
CSS:
html {
font-size: 62.5%;
}
.parent {
font-size: 3rem; /*If i declare in parent the font calculation is 45px, meaning it calculates 15px per 1rem*/
}
.children {
font-size: 3rem; /*While if i declare directly to the element he follow my calculation 10px per 1rem. So here the calculation is 30px*/
}
Why?