JSFiddle - React, Tailwind, and code Playground

HTML

<p class="testHenk">
testhenk
</p>

<p class="badLuna"></p>

CSS

:root {
  font-size: 1%;
}

.badLuna {
  font-size: 16px;
}

JavaScript

fontSizeExtract = document.body.getElementsByClassName( "testHenk" )[ 0 ];
defaultFontSize = window.getComputedStyle( fontSizeExtract )
  .getPropertyValue( "font-size" );

badLuna = document.body.getElementsByClassName( "badLuna" )[ 0 ];
badLuna.textContent = "The font size of the text above is: " + defaultFontSize;