Detecting the default browser font size in JavaScript
From an accessibility point of view, it's worth considering the default font size set in the user's browser. You can easily adjust your design to this value in CSS stylesheets using relative units like rem
and em
. There might be a situation where you need this value from the JavaScript context. How to get it?