Is there a function that will take a custom CSS file and change the variables fheight and fwidth to the output from screen.height and screen.width, respectively? I am trying to build a js reveal presentation using percentages to position elements, and I understand that the properties height, top, and bottom will only accept percentages as values if the dimensions of a parent element are specified. I cannot specify the dimensions of the slide using anything other than the Javascript functions screen.height and screen.width because I want the presentation to work on displays of any size. Is there an R, Javascript, or other language function that will take a custom CSS file with the variables fheight and fwidth as input, and return a CSS file with those variables replaced by pixel values?
I want my CSS file to look like:
html, body{
height: fheight;
width: fwidth;
}
After the html and body elements' height and width are set to the dimensions of the display, I think that the percentages to specify height and position will work.