Bad test siblinggeneral
Author: VostryakoffCreated Nov 19, 2025Updated Nov 23, 2025
Type of bug Modernizr error
Describe the bug code from lib
Modernizr.addTest('siblinggeneral', function() {
return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
return elem.lastChild.offsetWidth === 200;
}, 2);
});Expected behavior elem.lastChild in this case is
Source: Modernizr/Modernizr