I have this function to setup initial values for css variables:
$(function() {
$(":root").style.setProperty("--bkcolor", "hotpink");
$(":root").style.setProperty("--fwcolor", "yellow");
$(":root").style.setProperty("--fontfam", "Segoe UI");
$(":root").style.setProperty("--bkcolor-header", "hotpink");
$(":root").style.setProperty("--fwcolor-header", "yellow");
$(":root").style.setProperty("--fontfam-header", "Segoe Script");
$(":root").style.setProperty("--prc-navbar", "70%");
$(":root").style.setProperty("--bkcolor-banner", "yellow");
$(":root").style.setProperty("--fwcolor-banner", "hotpink");
$(":root").style.setProperty("--fontfam-banner", "Segoe Script");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
The function work fine except for $(":root").style.setProperty("--prc-navbar", "70%");
How to set values like 70%, 70px?