frontend/.pnpm-store/v3/files/78/24d9aca35d73c0b5695e842e1a08ea76c0437e1e271fa6d649f45d860c9a65ce4753748077ace3cc56db98faef73cc534df08aadb625d0566864f87d8d12e5

14 lines
614 B
Plaintext

// https://github.com/Modernizr/Modernizr/issues/572
// http://jsfiddle.net/glsee/JDsWQ/4/
Modernizr.addTest('cssvmaxunit', function(){
var bool;
Modernizr.testStyles("#modernizr { width: 50vmax; }", function(elem, rule) {
var one_vw = window.innerWidth/100,
one_vh = window.innerHeight/100,
compWidth = parseInt((window.getComputedStyle ?
getComputedStyle(elem, null) :
elem.currentStyle)['width'],10);
bool = ( parseInt(Math.max(one_vw, one_vh)*50,10) == compWidth );
});
return bool;
});