/// <reference path="../Elements.ts" />

/**
 * Update font sizes according to screen resolution and/or mobile status
 */
function updateFontSize () {
    var minWidth = Elements.isMobile? 800 : 1280;
    var proportion = Elements.isMobile ? 17 : 14.5;
    var width = document.body.clientWidth < minWidth ? minWidth : document.body.clientWidth;
    document.documentElement.style[ "font-size" ] = (width * proportion / 1280) + "px";
}

updateFontSize();
window.addEventListener("resize", updateFontSize);