<!DOCTYPE>
<html>
<style>
 #element-container-vmin {
   background:green;
 }
</style>
<div id="element-container-vmin">TEST PASSED</div>
<script>
function applyStyle() {
    var viewportMinLength = Math.min(window.innerWidth, window.innerHeight);
    var elementStyle = document.getElementById("element-container-vmin").style;
    elementStyle.height = Math.floor(30 * viewportMinLength / 100) + "px";
    elementStyle.width = Math.floor(30 * viewportMinLength / 100) + "px";
    elementStyle.fontSize = Math.floor(3 * viewportMinLength / 100) + "px";
    elementStyle.lineHeight = Math.floor(4 * viewportMinLength / 100) + "px";
    elementStyle.textIndent = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.marginLeft = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.marginRight = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.marginTop = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.marginBottom = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.borderTopLeftRadius = Math.floor(1 * viewportMinLength / 100) + "px";
    elementStyle.borderTopRightRadius = Math.floor(1 * viewportMinLength / 100) + "px";
    elementStyle.borderBottomLeftRadius = Math.floor(1 * viewportMinLength / 100) + "px";
    elementStyle.borderBottomRightRadius = Math.floor(1 * viewportMinLength / 100) + "px";
    elementStyle.paddingLeft = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.paddingRight = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.paddingTop = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.paddingBottom = Math.floor(2 * viewportMinLength / 100) + "px";
    elementStyle.minHeight = Math.floor(10 * viewportMinLength / 100) + "px";
    elementStyle.minWidth = Math.floor(10 * viewportMinLength / 100) + "px";
    elementStyle.maxHeight = Math.floor(60 * viewportMinLength / 100) + "px";
    elementStyle.maxWidth = Math.floor(60 * viewportMinLength / 100) + "px";
}
applyStyle();
</script>
</html>
