My current issue involves trying to obtain the font size of an element in the following manner:
getComputedStyle(MyTargetElement , "").getPropertyValue('font-size')
The result is coming back as 16px
, when it should actually be 14px
. Why is this discrepancy occurring?
<RootElement /> fontsze:14px
<GranParent /> fontsze:1rem
<Parent /> fontsze:1em
<MyTargetElement /> fontsze:1em
Where did I go wrong in this scenario?