frontend/.pnpm-store/v3/files/02/d7ba10bdc75d59c759bb9f4d4177cfe2779f660e344d0086a46e6d9da792c8c3de5d7e2ca3a2b6f9710623c22e3bfa3db3fb691d16fc73e888fd8137c64579

14 lines
541 B
Plaintext

// https://github.com/Modernizr/Modernizr/issues/572
// Similar to http://jsfiddle.net/FWeinb/etnYC/
Modernizr.addTest('cssvhunit', function() {
var bool;
Modernizr.testStyles("#modernizr { height: 50vh; }", function(elem, rule) {
var height = parseInt(window.innerHeight/2,10),
compStyle = parseInt((window.getComputedStyle ?
getComputedStyle(elem, null) :
elem.currentStyle)["height"],10);
bool= (compStyle == height);
});
return bool;
});