frontend/.pnpm-store/v3/files/b8/1d525bbe1adf767fb7e38fb963dbe29213b614e0c5b123ee73646f7f4d56d6d87baa3685ff7a41e5e77b70fae0567c21cb9f0233d7268fd746ebe36308012f

15 lines
615 B
Plaintext

// https://github.com/Modernizr/Modernizr/issues/572
// http://jsfiddle.net/glsee/JRmdq/8/
Modernizr.addTest('cssvminunit', function(){
var bool;
Modernizr.testStyles("#modernizr { width: 50vmin; }", 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.min(one_vw, one_vh)*50,10) == compWidth );
});
return bool;
});